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

返回

将要序列化的被替换对象。

适用于