セキュリティ オブジェクトとその現在の状態を表す XML エンコーディングを作成します。
Public Overridable Function ToXml() As SecurityElement Implements _ ISecurityEncodable.ToXml
[C#]
public virtual SecurityElement ToXml();
[C++]
public: virtual SecurityElement* ToXml();
[JScript]
public function ToXml() : SecurityElement;
戻り値
セキュリティ オブジェクトとそのすべての状態情報を含む XML エンコーディング。
実装
使用例
' 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)
[C#]
// 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");
[C++]
// Display result of ToXml and FromXml operations.
PermissionSet* ps6 = new PermissionSet(PermissionState::None);
ps6->FromXml(ps5->ToXml());
Console::WriteLine(S"Result of ToFromXml = {0}\n", ps6);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, Common Language Infrastructure (CLI) Standard
参照
PermissionSet クラス | PermissionSet メンバ | System.Security 名前空間