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 變體類型時。