共用方式為


CipherData.GetXml 方法

定義

取得 CipherData 物件的 XML 值。

public:
 System::Xml::XmlElement ^ GetXml();
public System.Xml.XmlElement GetXml ();
member this.GetXml : unit -> System.Xml.XmlElement
Public Function GetXml () As XmlElement

傳回

XmlElement 物件,表示 CipherData 物件的 XML 資訊。

例外狀況

CipherValue 屬性和 CipherReference 屬性為 null

範例

下列程式碼範例示範如何建立 物件的新實例 CipherData

// Create a new CipherData object.
CipherData^ cipher = gcnew CipherData();
// Assign a byte array to be the CipherValue. This is a
// byte array representing encrypted data.
cipher->CipherValue = gcnew array<Byte>(8);
// Create a new CipherData object.
CipherData cd = new CipherData();
// Assign a byte array to be the CipherValue. This is a byte array representing encrypted data.
cd.CipherValue = new byte[8];
' Create a new CipherData object.
Dim cd As New CipherData
' Assign a byte array to the CipherValue.
cd.CipherValue = New Byte(7) {}

備註

使用這個方法來輸出 物件的 XML CipherData

適用於