UnknownWrapper 类

定义

注意

UnknownWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.

对封送处理程序应该将其作为 VT_UNKNOWN 封送的对象进行包装。

public ref class UnknownWrapper sealed
[System.Obsolete("UnknownWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")]
public sealed class UnknownWrapper
public sealed class UnknownWrapper
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class UnknownWrapper
[<System.Obsolete("UnknownWrapper and support for marshalling to the VARIANT type may be unavailable in future releases.")>]
type UnknownWrapper = class
type UnknownWrapper = class
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type UnknownWrapper = class
Public NotInheritable Class UnknownWrapper
继承
UnknownWrapper
属性

注解

仅当方法的托管签名采用对象时适用。

int MyMethod(Object o); //Managed signature  
    HRESULT MyMethod(VARIANT o); //COM signature  
    MyObject o = new MyObject();  
    MyMethod(o); //o gets passed as VARIANT VT_DISPATCH  
    MyMethod(new UnknownWrapper(o)); //o gets passed as VARIANT VT_UNKNOWN  

构造函数

UnknownWrapper(Object)

使用要被包装的对象初始化 UnknownWrapper 类的新实例。

属性

WrappedObject

获取此包装包含的对象。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于