共用方式為


ComVariant.Create<T>(T) 方法

定義

從指定的值建立 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 變體類型時。

適用於