ComVariant.Create<T>(T) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从指定值创建 ComVariant 实例。
public:
generic <typename T>
static System::Runtime::InteropServices::Marshalling::ComVariant Create(T value);
public static System.Runtime.InteropServices.Marshalling.ComVariant Create<T>(T value);
static member Create : 'T -> System.Runtime.InteropServices.Marshalling.ComVariant
Public Shared Function Create(Of T) (value As T) As ComVariant
类型参数
- T
指定值的类型。
参数
- value
- T
要包装在 ComVariant中的值。
返回
包含提供值的 ComVariant。
例外
当 T
不直接对应于 VarEnum 变体类型时。