Formatter.Context 属性
当在派生类中重写时,获取或设置用于当前序列化的 StreamingContext。
此属性不符合 CLS。
**命名空间:**System.Runtime.Serialization
**程序集:**mscorlib(在 mscorlib.dll 中)
语法
声明
Public MustOverride Property Context As StreamingContext
用法
Dim instance As Formatter
Dim value As StreamingContext
value = instance.Context
instance.Context = value
public abstract StreamingContext Context { get; set; }
public:
virtual property StreamingContext Context {
StreamingContext get () abstract;
void set (StreamingContext value) abstract;
}
/** @property */
public abstract StreamingContext get_Context ()
/** @property */
public abstract void set_Context (StreamingContext value)
public abstract function get Context () : StreamingContext
public abstract function set Context (value : StreamingContext)
属性值
用于当前序列化的 StreamingContext。
备注
StreamingContext 指示正在反序列化的位的源或正在序列化的位的目标。它对默认序列化没有影响,但会作为参数传递到 ISerializable 和 ISerializationSurrogate。
给继承者的说明 必须在派生类中实现此属性。
平台
Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0