> For the complete documentation index, see [llms.txt](https://web-api.iceteagroup.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://web-api.iceteagroup.com/ppj.web.49/com/ppj.runtime.com.salvariant.md).

# SalVariant

Namespace: **PPJ.Runtime.Com**

Assembly: **PPJ.Web.49** (4.9.0.0)

Variant implementation.

{% tabs %}
{% tab title="C#" %}

```csharp
public class SalVariant : SalFunctionalClass
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SalVariant
    Inherits SalFunctionalClass
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/qoQXnPICsjBVNBSqpOj9)SalVariant()

Constructs a new null SalVariant This class cannot be used as second-base class.

### ![](/files/qoQXnPICsjBVNBSqpOj9)SalVariant(value)

Constructs a new SalVariant with the wrapped value

| Name      | Type                                                                | Description |
| --------- | ------------------------------------------------------------------- | ----------- |
| **value** | [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) |             |

## Properties

### ![](/files/jDiecrwjcc5yZsrGcmX2)Optional

[SalVariant](https://docs.wisej.com/extensions/ppj.web.49/com/ppj.runtime.com.salvariant.md): Returns an empty SalVariant instance marked as optional.

### ![](/files/qoQXnPICsjBVNBSqpOj9)Value

[Object](https://docs.microsoft.com/en-us/dotnet/api/system.object): Returns/Sets the wrapped object.

## Methods

### ![](/files/qoQXnPICsjBVNBSqpOj9)ActiveXType()

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)AsActiveX(vt)

Changes the variant type.

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **vt**    | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetBlob(s)

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **s**     | [SalString&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetBoolean(b)

| Parameter | Type                                                         | Description |
| --------- | ------------------------------------------------------------ | ----------- |
| **b**     | [SalBoolean&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetDate(d)

| Parameter | Type                                                          | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| **d**     | [SalDateTime&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetNumber(num)

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **num**   | [SalNumber&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetObject(obj)

| Parameter | Type                                                                                       | Description |
| --------- | ------------------------------------------------------------------------------------------ | ----------- |
| **obj**   | [SalObject](https://docs.wisej.com/extensions/ppj.web.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetSafeArray(array)

| Parameter | Type                                                           | Description |
| --------- | -------------------------------------------------------------- | ----------- |
| **array** | [SalSafeArray&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)GetString(s)

| Parameter | Type                                                        | Description |
| --------- | ----------------------------------------------------------- | ----------- |
| **s**     | [SalString&](/ppj.web.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)MakeOptional()

Call this when using a Variant as an optional parameter.

### ![](/files/qoQXnPICsjBVNBSqpOj9)SalType()

**Returns:** [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetBlob(s)

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetBoolean(b)

| Parameter | Type                                                                                       | Description |
| --------- | ------------------------------------------------------------------------------------------ | ----------- |
| **b**     | [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetDate(d)

| Parameter | Type                                                                                         | Description |
| --------- | -------------------------------------------------------------------------------------------- | ----------- |
| **d**     | [SalDateTime](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.saldatetime.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetNumber(num, vt\_type)

| Parameter    | Type                                                                                     | Description |
| ------------ | ---------------------------------------------------------------------------------------- | ----------- |
| **num**      | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |
| **vt\_type** | [SalNumber](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salnumber.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetObject(o)

| Parameter | Type                                                                                       | Description |
| --------- | ------------------------------------------------------------------------------------------ | ----------- |
| **o**     | [SalObject](https://docs.wisej.com/extensions/ppj.web.49/com/ppj.runtime.com.salobject.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetSafeArray(array)

| Parameter | Type                                                                                             | Description |
| --------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **array** | [SalSafeArray](https://docs.wisej.com/extensions/ppj.web.49/com/ppj.runtime.com.salsafearray.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)SetString(s)

| Parameter | Type                                                                                     | Description |
| --------- | ---------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salstring.md) |             |

**Returns:** [SalBoolean](https://docs.wisej.com/extensions/ppj.web.49/types/ppj.runtime.salboolean.md).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToByte()

to byte

**Returns:** [Byte](https://docs.microsoft.com/en-us/dotnet/api/system.byte).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToCurrency()

to currency

**Returns:** [CurrencyWrapper](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.currencywrapper).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToDateTime()

to datetime

**Returns:** [DateTime](https://docs.microsoft.com/en-us/dotnet/api/system.datetime).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToDecimal()

to decimal

**Returns:** [Decimal](https://docs.microsoft.com/en-us/dotnet/api/system.decimal).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToDouble()

to double

**Returns:** [Double](https://docs.microsoft.com/en-us/dotnet/api/system.double).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToInt16()

to int16

**Returns:** [Int16](https://docs.microsoft.com/en-us/dotnet/api/system.int16).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToInt32()

to int32

**Returns:** [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToInt64()

to int64

**Returns:** [Int64](https://docs.microsoft.com/en-us/dotnet/api/system.int64).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToSByte()

to sbyte

**Returns:** [SByte](https://docs.microsoft.com/en-us/dotnet/api/system.sbyte).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToSingle()

to single

**Returns:** [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToUInt16()

to uint16

**Returns:** [UInt16](https://docs.microsoft.com/en-us/dotnet/api/system.uint16).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToUInt32()

to uint32

**Returns:** [UInt32](https://docs.microsoft.com/en-us/dotnet/api/system.uint32).

### ![](/files/qoQXnPICsjBVNBSqpOj9)ToUInt64()

to uint64

**Returns:** [UInt64](https://docs.microsoft.com/en-us/dotnet/api/system.uint64).
