> ## 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.

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

  ```vb VB.NET theme={null}
  Public Class DataObject
  ```
</CodeGroup>

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

[Web API Reference](/api-reference/generated/model/DataObject)

## Properties

<a id="id-59b25b778f" />

### Id

A unique identification number for the *Data Object*.

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

  ```vb VB.NET theme={null}
  Public Property Id As Long
  ```
</CodeGroup>

**Type:** `long`

<a id="int-value-4a6f5da5f9" />

### IntValue

An int value (int32) to store.

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

  ```vb VB.NET theme={null}
  Public Property IntValue As Integer
  ```
</CodeGroup>

**Type:** `int`

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

<a id="name-4941336256" />

### Name

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

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

  ```vb VB.NET theme={null}
  Public Property Name As String
  ```
</CodeGroup>

**Type:** `string`

The API accepts names up to 100 characters long.

<a id="string-value-3d1d3cd3b8" />

### StringValue

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

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

  ```vb VB.NET theme={null}
  Public Property StringValue As String
  ```
</CodeGroup>

**Type:** `string`

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

## Constructors

<a id="ctor-2044ed9f12" />

### DataObject()

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

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

  ```vb VB.NET theme={null}
  Public Sub New()
  ```
</CodeGroup>

## Methods

<a id="decrement-int-value-6d3d78751a" />

### DecrementIntValue(string, int)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

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

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

See [DecrementIntValue](/api-reference/generated/DecrementIntValue) for the API parameters and permissions.

<a id="decrement-int-value-d69803c757" />

### DecrementIntValue(string, int, LicenseKey)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `decrementValue` | `int` | The number we should decrement by. |
| `licenseKey` | [`LicenseKey`](/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](/api-reference/generated/DecrementIntValue) for the API parameters and permissions.

<a id="decrement-int-value-e2538bdfaf" />

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

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `decrementValue` | `int` | The number we should decrement by. |
| `licenseKey` | [`LicenseKey`](/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. <br />(for Decrement Int Value) For example, if you set the \<code class="paramref">lowerBound\</code> parameter (below) to 0, <br />you will be able to decrement the int value until you reach zero (inclusive).<br />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](/api-reference/generated/DecrementIntValue) for the API parameters and permissions.

<a id="decrement-int-value-53abd64fd3" />

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

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `decrementValue` | `int` | The number we should decrement by. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an lower bound. <br />(for Decrement Int Value) For example, if you set the \<code class="paramref">lowerBound\</code> parameter (below) to 0, <br />you will be able to decrement the int value until you reach zero (inclusive).<br />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](/api-reference/generated/DecrementIntValue) for the API parameters and permissions.

<a id="equals-f8420bdf21" />

### Equals(object)

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

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

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

**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.

<a id="increment-int-value-50a9744348" />

### IncrementIntValue(string, int)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

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

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

Note: for more details, please see
[IncrementIntValue](/api-reference/generated/IncrementIntValue)

<a id="increment-int-value-fb28371b49" />

### IncrementIntValue(string, int, LicenseKey)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `incrementValue` | `int` | The number we should increment by. |
| `licenseKey` | [`LicenseKey`](/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](/api-reference/generated/IncrementIntValue)

<a id="increment-int-value-072f5aa57f" />

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

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `incrementValue` | `int` | The number we should increment by. |
| `licenseKey` | [`LicenseKey`](/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. <br />(for Increment Int Value) For example, if you set the \<code class="paramref">upperBound\</code> parameter (below) to 10, you<br />will be able to increment the int value until you reach ten (inclusive).<br />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](/api-reference/generated/IncrementIntValue)

<a id="increment-int-value-aa006f14a5" />

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

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `incrementValue` | `int` | The number we should increment by. |
| `enableBound` | `bool` | If set to true, it will be possible to specify an upper/lower bound. <br />(for Increment Int Value) For example, if you set the \<code class="paramref">upperBound\</code> parameter (below) to 10, you<br />will be able to increment the int value until you reach ten (inclusive).<br />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](/api-reference/generated/IncrementIntValue)

<a id="set-int-value-0c82614868" />

### SetIntValue(string, int)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**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](/api-reference/generated/SetIntValue) for the API parameters and permissions.

<a id="set-int-value-21f859cc0f" />

### SetIntValue(string, int, LicenseKey)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | An access token with the SetIntValue permission. |
| `value` | `int` | The new int value |
| `licenseKey` | [`LicenseKey`](/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](/api-reference/generated/SetIntValue) for the API parameters and permissions.

<a id="set-string-value-2dcb972513" />

### SetStringValue(string, string)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

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

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

Note: for more details, please see
[SetStringValue](/api-reference/generated/SetStringValue)

<a id="set-string-value-4e7f78085b" />

### SetStringValue(string, string, LicenseKey)

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

<CodeGroup>
  ```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
  ```
</CodeGroup>

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `value` | `string` | The new int value |
| `licenseKey` | [`LicenseKey`](/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](/api-reference/generated/SetStringValue)

<a id="to-string-40abb0ffa8" />

### ToString()

Returns a text representation of this object.

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

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

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

[.NET SDK Reference](/libraries/dotnet-api) · [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.