> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET: DataObject

> Signatures, models and behavior for SKM.V3.DataObject in the .NET SDK 4.0.54.

A Data Object used to store information.

**Namespace:** `SKM.V3`\
**Version:** 4.0.54. Both packages; all six documented target frameworks.

```csharp C# theme={null}
public class DataObject
```

```vb VB.NET theme={null}
Public Class DataObject
```

**Used By:** [`Get(List<DataObject>, string)`](https://help.cryptolens.io/libraries/dotnet-reference/extension-methods#get-053ca64adb), [`AddDataObject(string, DataObject)`](https://help.cryptolens.io/libraries/dotnet-reference/license-key#add-data-object-934b704905)

[Web API Reference](https://help.cryptolens.io/api-reference/generated/model/DataObject.md)

## Properties

### Id

A unique identification number for the *Data Object*.

```csharp C# theme={null}
public long Id { get; set; }
```

```vb VB.NET theme={null}
Public Property Id As Long
```

**Type:** `long`

### IntValue

An int value (int32) to store.

```csharp C# theme={null}
public int IntValue { get; set; }
```

```vb VB.NET theme={null}
Public Property IntValue As Integer
```

**Type:** `int`

Assigning this property changes only the local object. To save a change through the API, use [`SetIntValue(string, int)`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#set-int-value-0c82614868) or its license-key overload.

### Name

A way to identify the current object, for instance, OS\_Version.

```csharp C# theme={null}
public string Name { get; set; }
```

```vb VB.NET theme={null}
Public Property Name As String
```

**Type:** `string`

The API accepts names up to 100 characters long.

### StringValue

A string value (text) to store. The API accepts up to 10,000 characters.

```csharp C# theme={null}
public string StringValue { get; set; }
```

```vb VB.NET theme={null}
Public Property StringValue As String
```

**Type:** `string`

Assigning this property changes only the local object. To save a change through the API, use [`SetStringValue(string, string)`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#set-string-value-2dcb972513) or its license-key overload.

## Constructors

### DataObject()

Creates an empty DataObject object. This constructor does not send an API request.

```csharp C# theme={null}
public DataObject()
```

```vb VB.NET theme={null}
Public Sub New()
```

## Methods

### DecrementIntValue(string, int)

Decrements the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool DecrementIntValue(string token, int decrementValue)
```

```vb VB.NET theme={null}
Public Function DecrementIntValue(token As String, decrementValue As Integer) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `decrementValue` | `int` | The number we should decrement by. |

**Returns:** `bool`. Returns true if successful or false otherwise.

See [DecrementIntValue](https://help.cryptolens.io/api-reference/generated/DecrementIntValue.md) for the API parameters and permissions.

### DecrementIntValue(string, int, LicenseKey)

Decrements the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool DecrementIntValue(string token, int decrementValue, LicenseKey licenseKey)
```

```vb VB.NET theme={null}
Public Function DecrementIntValue(token As String, decrementValue As Integer, licenseKey As LicenseKey) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `decrementValue` | `int` | The number we should decrement by. |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |

**Returns:** `bool`. Returns true if successful or false otherwise.

See [DecrementIntValue](https://help.cryptolens.io/api-reference/generated/DecrementIntValue.md) for the API parameters and permissions.

### DecrementIntValue(string, int, LicenseKey, bool, int)

Decrements the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool DecrementIntValue(string token, int decrementValue, LicenseKey licenseKey, bool enableBound = false, int lowerBound = 0)
```

```vb VB.NET theme={null}
Public Function DecrementIntValue(token As String, decrementValue As Integer, licenseKey As LicenseKey, Optional enableBound As Boolean = False, Optional lowerBound As Integer = 0) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `decrementValue` | `int` | The number we should decrement by. |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an lower bound. (for Decrement Int Value) For example, if you set the \<code class="paramref">lowerBound\</code> parameter (below) to 0, you will be able to decrement the int value until you reach zero (inclusive). Once the lower bound is reached, an error will be thrown. |
| `lowerBound` | `int` | The upper bound. It only works if \<code class="paramref">enableBound\</code> is set to true. |

**Returns:** `bool`. Returns true if successful or false otherwise.

See [DecrementIntValue](https://help.cryptolens.io/api-reference/generated/DecrementIntValue.md) for the API parameters and permissions.

### DecrementIntValue(string, int, bool, int)

Decrements the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool DecrementIntValue(string token, int decrementValue, bool enableBound = false, int lowerBound = 0)
```

```vb VB.NET theme={null}
Public Function DecrementIntValue(token As String, decrementValue As Integer, Optional enableBound As Boolean = False, Optional lowerBound As Integer = 0) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `decrementValue` | `int` | The number we should decrement by. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an lower bound. (for Decrement Int Value) For example, if you set the \<code class="paramref">lowerBound\</code> parameter (below) to 0, you will be able to decrement the int value until you reach zero (inclusive). Once the lower bound is reached, an error will be thrown. |
| `lowerBound` | `int` | The upper bound. It only works if \<code class="paramref">enableBound\</code> is set to true. |

**Returns:** `bool`. Returns true if successful or false otherwise.

See [DecrementIntValue](https://help.cryptolens.io/api-reference/generated/DecrementIntValue.md) for the API parameters and permissions.

### Equals(object)

Compares this object with another object using this type's equality implementation.

```csharp C# theme={null}
public override bool Equals(object obj)
```

```vb VB.NET theme={null}
Public Overrides Function Equals(obj As Object) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `obj` | `object` | The object to compare. |

**Returns:** `bool`. True when the compared fields match; otherwise false. This is not a signature or license-validity check.

**Checks:** This comparison is not signature verification or license validation.

### IncrementIntValue(string, int)

Increments the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool IncrementIntValue(string token, int incrementValue)
```

```vb VB.NET theme={null}
Public Function IncrementIntValue(token As String, incrementValue As Integer) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `incrementValue` | `int` | The number we should increment by. |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[IncrementIntValue](https://help.cryptolens.io/api-reference/generated/IncrementIntValue.md)

### IncrementIntValue(string, int, LicenseKey)

Increments the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool IncrementIntValue(string token, int incrementValue, LicenseKey licenseKey)
```

```vb VB.NET theme={null}
Public Function IncrementIntValue(token As String, incrementValue As Integer, licenseKey As LicenseKey) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `incrementValue` | `int` | The number we should increment by. |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[IncrementIntValue](https://help.cryptolens.io/api-reference/generated/IncrementIntValue.md)

### IncrementIntValue(string, int, LicenseKey, bool, int)

Increments the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool IncrementIntValue(string token, int incrementValue, LicenseKey licenseKey, bool enableBound = false, int upperBound = 0)
```

```vb VB.NET theme={null}
Public Function IncrementIntValue(token As String, incrementValue As Integer, licenseKey As LicenseKey, Optional enableBound As Boolean = False, Optional upperBound As Integer = 0) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `incrementValue` | `int` | The number we should increment by. |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an upper/lower bound. (for Increment Int Value) For example, if you set the \<code class="paramref">upperBound\</code> parameter (below) to 10, you will be able to increment the int value until you reach ten (inclusive). Once the upper bound is reached, an error will be thrown. |
| `upperBound` | `int` | The upper bound. It only works if \<code class="paramref">enableBound\</code> is set to true. |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[IncrementIntValue](https://help.cryptolens.io/api-reference/generated/IncrementIntValue.md)

### IncrementIntValue(string, int, bool, int)

Increments the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) by a given amount. (in SKM Platform).

```csharp C# theme={null}
public bool IncrementIntValue(string token, int incrementValue, bool enableBound = false, int upperBound = 0)
```

```vb VB.NET theme={null}
Public Function IncrementIntValue(token As String, incrementValue As Integer, Optional enableBound As Boolean = False, Optional upperBound As Integer = 0) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `incrementValue` | `int` | The number we should increment by. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an upper/lower bound. (for Increment Int Value) For example, if you set the \<code class="paramref">upperBound\</code> parameter (below) to 10, you will be able to increment the int value until you reach ten (inclusive). Once the upper bound is reached, an error will be thrown. |
| `upperBound` | `int` | The upper bound. It only works if \<code class="paramref">enableBound\</code> is set to true. |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[IncrementIntValue](https://help.cryptolens.io/api-reference/generated/IncrementIntValue.md)

### SetIntValue(string, int)

Sets the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) to a new value (in Cryptolens).

```csharp C# theme={null}
public bool SetIntValue(string token, int value)
```

```vb VB.NET theme={null}
Public Function SetIntValue(token As String, value As Integer) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | An access token with the SetIntValue permission. |
| `value` | `int` | The new int value |

**Returns:** `bool`. True when the API reports success; otherwise false. On success, this object's `IntValue` is also updated.

See [SetIntValue](https://help.cryptolens.io/api-reference/generated/SetIntValue.md) for the API parameters and permissions.

### SetIntValue(string, int, LicenseKey)

Sets the [`IntValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#int-value-4a6f5da5f9) to a new value (in SKM Platform).

```csharp C# theme={null}
public bool SetIntValue(string token, int value, LicenseKey licenseKey)
```

```vb VB.NET theme={null}
Public Function SetIntValue(token As String, value As Integer, licenseKey As LicenseKey) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | An access token with the SetIntValue permission. |
| `value` | `int` | The new int value |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |

**Returns:** `bool`. True when the API reports success; otherwise false. On success, this object's `IntValue` is also updated.

See [SetIntValue](https://help.cryptolens.io/api-reference/generated/SetIntValue.md) for the API parameters and permissions.

### SetStringValue(string, string)

Sets the [`StringValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#string-value-3d1d3cd3b8) to a new value (in SKM Platform).

```csharp C# theme={null}
public bool SetStringValue(string token, string value)
```

```vb VB.NET theme={null}
Public Function SetStringValue(token As String, value As String) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `value` | `string` | The new int value |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[SetStringValue](https://help.cryptolens.io/api-reference/generated/SetStringValue.md)

### SetStringValue(string, string, LicenseKey)

Sets the [`StringValue`](https://help.cryptolens.io/libraries/dotnet-reference/data-object#string-value-3d1d3cd3b8) to a new value (in SKM Platform).

```csharp C# theme={null}
public bool SetStringValue(string token, string value, LicenseKey licenseKey)
```

```vb VB.NET theme={null}
Public Function SetStringValue(token As String, value As String, licenseKey As LicenseKey) As Boolean
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](https://help.cryptolens.io/api-reference/generated/Auth.md) |
| `value` | `string` | The new int value |
| `licenseKey` | [`LicenseKey`](https://help.cryptolens.io/libraries/dotnet-reference/license-key) | The license key we should associate with this data object. |

**Returns:** `bool`. Returns true if successful or false otherwise.

Note: for more details, please see
[SetStringValue](https://help.cryptolens.io/api-reference/generated/SetStringValue.md)

### ToString()

Returns a text representation of this object.

```csharp C# theme={null}
public override string ToString()
```

```vb VB.NET theme={null}
Public Overrides Function ToString() As String
```

**Returns:** `string`. A string representation of this object.

[.NET SDK Reference](https://help.cryptolens.io/libraries/dotnet-api.md) · [Reviewed Source Revision](https://github.com/Cryptolens/cryptolens-dotnet/tree/30aaf399ba53d9a111bee896c35bf557fa219394)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.