ContextAttribute.IsNewContextOK 方法

此方法支持 .NET 基础结构,但不适合在代码中直接使用。

返回一个指示上下文属性是否与新上下文兼容的布尔值。

**命名空间:**System.Runtime.Remoting.Contexts
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public Overridable Function IsNewContextOK ( _
    newCtx As Context _
) As Boolean
用法
Dim instance As ContextAttribute
Dim newCtx As Context
Dim returnValue As Boolean

returnValue = instance.IsNewContextOK(newCtx)
public virtual bool IsNewContextOK (
    Context newCtx
)
public:
virtual bool IsNewContextOK (
    Context^ newCtx
)
public boolean IsNewContextOK (
    Context newCtx
)
public function IsNewContextOK (
    newCtx : Context
) : boolean

参数

  • newCtx
    已在其中创建属性的新上下文。

返回值

如果上下文属性与新上下文兼容,则为 true;否则为 false

备注

将所有上下文属性添加到新上下文后,会进行查询以确定它们在新上下文中是否正常。该上下文属性可以查看新上下文的 ContextProperties 属性中的其他属性,并确定是否与这些上下文属性兼容。

提示

默认情况下,IsNewContextOK 方法返回 true

平台

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

请参见

参考

ContextAttribute 类
ContextAttribute 成员
System.Runtime.Remoting.Contexts 命名空间