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

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

KeyContainerPermission.FromXml メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

XML エンコーディングから、指定した状態のアクセス許可を再構築します。

名前空間: System.Security.Permissions
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overrides Sub FromXml
 ( _
    securityElement As SecurityElement _
)
Dim instance As KeyContainerPermission
Dim securityElement As SecurityElement

instance.FromXml(securityElement)
public override void FromXml (
    SecurityElement securityElement
)
public:
virtual void FromXml (
    SecurityElement^ securityElement
) override
public void FromXml (
    SecurityElement securityElement
)
public override function FromXml (
    securityElement : SecurityElement
)

パラメータ

securityElement

アクセス許可の再構築に使用する XML エンコーディングを格納している SecurityElement。

例外例外
例外の種類条件

ArgumentNullException

securityElement が null 参照 (Visual Basic では Nothing) です。

ArgumentException

securityElement が有効なアクセス許可要素ではありません。

または

securityElement のバージョン番号がサポートされていません。

解説解説

FromXml メソッドは、SecurityElement クラスで定義される XML エンコーディングから KeyContainerPermission オブジェクトを再構築します。ToXml メソッドを使用して、ステータス情報を含む KeyContainerPermission を XML でエンコードします。

使用例使用例

FromXml メソッドを使用するコード例を次に示します。このコード例は、KeyContainerPermission クラスのトピックで取り上げているコード例の一部分です。

' Perform an XML roundtrip.
keyContainerPerm3.FromXml(keyContainerPerm2.ToXml())
Console.WriteLine("Was the XML roundtrip successful? "
 + _
    keyContainerPerm3.Equals(keyContainerPerm2).ToString())
// Perform an XML roundtrip.
keyContainerPerm3.FromXml(keyContainerPerm2.ToXml());
Console.WriteLine("Was the XML roundtrip successful? " + 
    keyContainerPerm3.Equals(keyContainerPerm2));
// Perform an XML roundtrip.
keyContainerPerm3->FromXml( keyContainerPerm2->ToXml() );
Console::WriteLine( "Was the XML roundtrip successful? {0}", keyContainerPerm3->Equals(
 keyContainerPerm2 ) );

// Perform an XML roundtrip.
keyContainerPerm3.FromXml(keyContainerPerm2.ToXml());
Console.WriteLine(("Was the XML roundtrip successful? " + System.Convert.ToString(
    keyContainerPerm3.Equals(keyContainerPerm2))));
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
KeyContainerPermission クラス
KeyContainerPermission メンバ
System.Security.Permissions 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



KeyContainerPermission.FromXml メソッドのページの著作権

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

©2026 GRAS Group, Inc.RSS