# SalVariant

Namespace: **PPJ.Runtime.Com**

Assembly: **PPJ.Runtime.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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SalVariant()

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-e4f8ed47a52590951f725a10c269555e81d41d81%2Fstatic.png?alt=media)Optional

[SalVariant](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant): Returns an empty SalVariant instance marked as optional.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Value

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

## Methods

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ActiveXType()

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)AsActiveX(vt)

Changes the variant type.

| Parameter | Type                                                                                           | Description |
| --------- | ---------------------------------------------------------------------------------------------- | ----------- |
| **vt**    | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetBlob(s)

| Parameter | Type                                                                                            | Description |
| --------- | ----------------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetBoolean(b)

| Parameter | Type                                                                                             | Description |
| --------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **b**     | [SalBoolean&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetDate(d)

| Parameter | Type                                                                                              | Description |
| --------- | ------------------------------------------------------------------------------------------------- | ----------- |
| **d**     | [SalDateTime&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetNumber(num)

| Parameter | Type                                                                                            | Description |
| --------- | ----------------------------------------------------------------------------------------------- | ----------- |
| **num**   | [SalNumber&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetObject(obj)

| Parameter | Type                                                                                           | Description |
| --------- | ---------------------------------------------------------------------------------------------- | ----------- |
| **obj**   | [SalObject](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetSafeArray(array)

| Parameter | Type                                                                                               | Description |
| --------- | -------------------------------------------------------------------------------------------------- | ----------- |
| **array** | [SalSafeArray&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)GetString(s)

| Parameter | Type                                                                                            | Description |
| --------- | ----------------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString&](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)MakeOptional()

Call this when using a Variant as an optional parameter.

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SalType()

**Returns:** [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetBlob(s)

| Parameter | Type                                                                                           | Description |
| --------- | ---------------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetBoolean(b)

| Parameter | Type                                                                                            | Description |
| --------- | ----------------------------------------------------------------------------------------------- | ----------- |
| **b**     | [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetDate(d)

| Parameter | Type                                                                                             | Description |
| --------- | ------------------------------------------------------------------------------------------------ | ----------- |
| **d**     | [SalDateTime](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetNumber(num, vt\_type)

| Parameter    | Type                                                                                           | Description |
| ------------ | ---------------------------------------------------------------------------------------------- | ----------- |
| **num**      | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |
| **vt\_type** | [SalNumber](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetObject(o)

| Parameter | Type                                                                                           | Description |
| --------- | ---------------------------------------------------------------------------------------------- | ----------- |
| **o**     | [SalObject](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetSafeArray(array)

| Parameter | Type                                                                                              | Description |
| --------- | ------------------------------------------------------------------------------------------------- | ----------- |
| **array** | [SalSafeArray](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SetString(s)

| Parameter | Type                                                                                           | Description |
| --------- | ---------------------------------------------------------------------------------------------- | ----------- |
| **s**     | [SalString](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant) |             |

**Returns:** [SalBoolean](https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant).

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToByte()

to byte

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToCurrency()

to currency

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToDateTime()

to datetime

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToDecimal()

to decimal

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToDouble()

to double

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToInt16()

to int16

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToInt32()

to int32

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToInt64()

to int64

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToSByte()

to sbyte

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToSingle()

to single

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToUInt16()

to uint16

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToUInt32()

to uint32

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

### ![](https://299326270-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7qefdGDqaAibSgFIaGI0%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)ToUInt64()

to uint64

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