WebPermission.ToXml メソッド
アセンブリ: System (system.dll 内)

Dim instance As WebPermission Dim returnValue As SecurityElement returnValue = instance.ToXml
ステータス情報を含む WebPermission の XML エンコードされた表現を格納する SecurityElement。


ToXml を使用して System.Security.SecurityElement を作成し、その属性をコンソールに表示する方法の例を次に示します。
' Create a WebPermission without permission on the protected resource. Dim myWebPermission1 As New WebPermission(PermissionState.None) ' Create a SecurityElement by calling the ToXml method on the WebPermission ' instance and display its attributes (which hold the XML encoding of ' the WebPermission). Console.WriteLine("Attributes and Values of the WebPermission are :") myWebPermission1.ToXml().ToString() ' Create another WebPermission with no permission on the protected resource. Dim myWebPermission2 As New WebPermission(PermissionState.None) 'Converts the new WebPermission from XML using myWebPermission1. myWebPermission2.FromXml(myWebPermission1.ToXml())
// Create a WebPermission without permission on the protected resource. WebPermission myWebPermission1 = new WebPermission(PermissionState.None); // Create a SecurityElement by calling the ToXml method on the WebPermission // instance and display its attributes (which hold the XML encoding of // the WebPermission). Console.WriteLine("Attributes and Values of the WebPermission are :"); myWebPermission1.ToXml().ToString(); // Create another WebPermission with no permission on the protected resource. WebPermission myWebPermission2 = new WebPermission(PermissionState.None); //Converts the new WebPermission from XML using myWebPermission1. myWebPermission2.FromXml(myWebPermission1.ToXml());
// Create a WebPermission without permission on the protected resource WebPermission^ myWebPermission1 = gcnew WebPermission( PermissionState::None ); // Create a SecurityElement by calling the ToXml method on the WebPermission // instance and display its attributes (which hold the XML encoding of // the WebPermission). Console::WriteLine( "Attributes and Values of the WebPermission are:" ); myWebPermission1->ToXml(); // Create another WebPermission with no permission on the protected resource WebPermission^ myWebPermission2 = gcnew WebPermission( PermissionState::None ); //Converts the new WebPermission from XML using myWebPermission1. myWebPermission2->FromXml( myWebPermission1->ToXml() );
// Create a WebPermission without permission on the protected resource. WebPermission myWebPermission1 = new WebPermission(PermissionState.None); // Create a SecurityElement by calling the ToXml method on the // WebPermission instance and display its attributes (which hold the // XML encoding of the WebPermission). Console.WriteLine("Attributes and Values of the WebPermission are :"); myWebPermission1.ToXml().ToString(); // Create another WebPermission with no permission on the protected // resource. WebPermission myWebPermission2 = new WebPermission(PermissionState.None); //Converts the new WebPermission from XML using myWebPermission1. myWebPermission2.FromXml(myWebPermission1.ToXml());

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebPermission.ToXml メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebPermission.ToXml メソッドのページへのリンク