WebPermission.ToXml メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebPermission.ToXml メソッドの意味・解説 

WebPermission.ToXml メソッド

WebPermission とその現在の状態を表す XML エンコーディング作成します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public Overrides Function
 ToXml As SecurityElement
Dim instance As WebPermission
Dim returnValue As SecurityElement

returnValue = instance.ToXml
public override SecurityElement ToXml ()
public:
virtual SecurityElement^ ToXml () override
public SecurityElement ToXml ()
public override function ToXml () : SecurityElement

戻り値
ステータス情報を含む WebPermissionXML エンコードされた表現格納する 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());
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebPermission クラス
WebPermission メンバ
System.Net 名前空間
FromXml


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebPermission.ToXml メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebPermission.ToXml メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebPermission.ToXml メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

WebPermission.ToXml メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebPermission.ToXml メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS