共用方式為


ISerializationSurrogateProvider.GetObjectToSerialize(Object, Type) 方法

定義

在序列化期間,傳回取代指定物件的物件。

public:
 System::Object ^ GetObjectToSerialize(System::Object ^ obj, Type ^ targetType);
public object GetObjectToSerialize (object obj, Type targetType);
abstract member GetObjectToSerialize : obj * Type -> obj
Public Function GetObjectToSerialize (obj As Object, targetType As Type) As Object

參數

obj
Object

要取代的物件。

targetType
Type

Type,應該要指派給已取代物件的型別。

傳回

將序列化的已取代物件。

適用於