Прочетете на английски Редактиране

Споделяне чрез


ComVariant Struct

Definition

A type that represents an OLE VARIANT in managed code.

C#
public struct ComVariant : IDisposable
Inheritance
ComVariant
Implements

Properties

Null

A ComVariant instance that represents a null value with VT_NULL type.

VarType

The type of the data stored in this ComVariant.

Methods

As<T>()

Create a managed value based on the value in the ComVariant instance.

Create<T>(T)

Create an ComVariant instance from the specified value.

CreateRaw<T>(VarEnum, T)

Create a ComVariant with the given type and provided value.

Dispose()

Release resources owned by this ComVariant instance.

GetRawDataRef<T>()

Get a reference to the storage location within this ComVariant instance.

Applies to

Продукт Версии
.NET 9, 10