語言

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 包含所提供值的 。

例外狀況

When T 並不直接對應變 VarEnum 體類型。

適用於