BinaryMessageFormatter.Clone 方法

定義

建立 BinaryMessageFormatter 類別的執行個體,其讀取/寫入屬性 (根物件和型別描述格式) 和目前的 BinaryMessageFormatter 相同。Creates an instance of the BinaryMessageFormatter class whose read/write properties (the root object and type description formats) are the same as the current BinaryMessageFormatter.

public:
 virtual System::Object ^ Clone();
public object Clone ();
abstract member Clone : unit -> obj
override this.Clone : unit -> obj
Public Function Clone () As Object

傳回

Object

物件,其屬性和這個 BinaryMessageFormatter 的屬性相同,但是其中繼資料 (Metadata) 沒有指定它為格式子類別執行個體。An object whose properties are identical to those of this BinaryMessageFormatter, but whose metadata does not specify it to be a formatter class instance.

實作

備註

重要

使用不信任的資料呼叫此類別的方法,會造成安全性上的風險。Calling methods from this class with untrusted data is a security risk. 呼叫此類別的方法時,請一律使用信任的資料。Call the methods from this class only with trusted data. 如需詳細資訊,請參閱資料驗證For more information, see Data Validation.

這個方法會建立格式子的複本,並將其所有屬性初始化為這個的值 BinaryMessageFormatterThis method creates a copy of the formatter and initializes all its properties to the values of this BinaryMessageFormatter. 它是用於擴充性,但不保證讀取或寫入執行緒的安全。It is used for scalability, but does not guarantee read or write thread safety.

適用於

另請參閱