# 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

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

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

### ![](/files/dBIrS7XBDGmrzmTRbSI6)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/69uzLyEV3ANF4GK6pznb)Optional

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

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

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

## Methods

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

**Returns:** [SalNumber](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

Changes the variant type.

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

| Parameter | Type                                                           | Description |
| --------- | -------------------------------------------------------------- | ----------- |
| **obj**   | [SalObject](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

Call this when using a Variant as an optional parameter.

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

**Returns:** [SalNumber](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

| Parameter | Type                                                           | Description |
| --------- | -------------------------------------------------------------- | ----------- |
| **o**     | [SalObject](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md) |             |

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

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

**Returns:** [SalBoolean](/ppj.runtime.49/com/ppj.runtime.com.salvariant.md).

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

to byte

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

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

to currency

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

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

to datetime

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

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

to decimal

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

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

to double

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

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

to int16

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

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

to int32

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

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

to int64

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

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

to sbyte

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

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

to single

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

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

to uint16

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

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

to uint32

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

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

to uint64

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://desktop-api.iceteagroup.com/ppj.runtime.49/com/ppj.runtime.com.salvariant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
