PermissionSet.ToXml メソッド

定義

セキュリティ オブジェクトとその現在の状態の XML エンコードを作成します。

public:
 virtual System::Security::SecurityElement ^ ToXml();
public virtual System.Security.SecurityElement ToXml ();
public virtual System.Security.SecurityElement? ToXml ();
abstract member ToXml : unit -> System.Security.SecurityElement
override this.ToXml : unit -> System.Security.SecurityElement
Public Overridable Function ToXml () As SecurityElement

戻り値

状態情報のすべてを含む、セキュリティ オブジェクトの XML エンコーディング。

実装

次のコード例は、 メソッドの使用方法を ToXml 示しています。 このコード例は、PermissionSet クラスのために提供されている大規模な例の一部です。

// Display result of ToXml and FromXml operations.
PermissionSet^ ps6 = gcnew PermissionSet( PermissionState::None );
ps6->FromXml( ps5->ToXml() );
Console::WriteLine( "Result of ToFromXml = {0}\n", ps6 );
// Display result of ToXml and FromXml operations.
PermissionSet ps6 = new PermissionSet(PermissionState.None);
ps6.FromXml(ps5.ToXml());
Console.WriteLine("Result of ToFromXml = " + ps6.ToString() + "\n");
' Display result of ToXml and FromXml operations.
Dim ps6 As New PermissionSet(PermissionState.None)
ps6.FromXml(ps5.ToXml())
Console.WriteLine("Result of ToFromXml = " & ps6.ToString() & ControlChars.Lf)

適用対象