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

Dim instance As WebPermission Dim securityElement As SecurityElement instance.FromXml(securityElement)



System.Security.SecurityElement を作成し、その属性を設定し、FromXml を使用して、この情報を WebPermission のインスタンスに転送する例を次に示します。
' 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.FromXml メソッドを検索する場合は、下記のリンクをクリックしてください。

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