> For the complete documentation index, see [llms.txt](https://docs.sansar.com/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sansar.com/latest/script-api-docs/sansar-script-namespace/componentid.md).

# ComponentID

### ComponentId Struct

Encapsulates a Component Id.

### Syntax

public struct **ComponentId**

### Member Details

#### Equals Method

> Value comparison for ComponentId.
>
> ### Syntax
>
> **Parameters**
>
> > *obj*
> >
> > The object to compare.
>
> **Returns**
>
> > true if the argument is a ComponentId and has the same value.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### GetHashCode Method

> Retrieves the hash code for this instance.
>
> ### Syntax
>
> public override [int](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Int32) **GetHashCode** ()
>
> **Returns**
>
> > The hash code for this instance.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### Invalid Field

> The invalid id object.
>
> ### Syntax
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### ObjectId Property

> ### Syntax
>
> public [ObjectId](https://help.sansar.com/hc/en-us/articles/115003430927) **ObjectId** { get; }
>
> **Value**
>
> > The is exactly 1 ObjectId associated with each ComponentId.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### op\_Equality Method

> ComponentId equality operator.
>
> ### Syntax
>
> **Parameters**
>
> > *a*
> >
> > First ComponentId to compare.
> >
> > *b*
> >
> > Second ComponentId to compare.
>
> **Returns**
>
> > true if the ComponentIds have the same value.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### Conversion Method

> Internal explicit conversion from a ulong.
>
> ### Syntax
>
> **Parameters**
>
> > *id*
> >
> > A ulong representation of an ComponentId
>
> **Returns**
>
> > A new ComponentId initialized with the given ulong.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### op\_Inequality Method

> ComponentId inequality operator.
>
> ### Syntax
>
> **Parameters**
>
> > *a*
> >
> > First ComponentId to compare.
> >
> > *b*
> >
> > Second ComponentId to compare.
>
> **Returns**
>
> > true if the ComponentIds have a different value.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

#### ToString Method

> Converts the id to a hexadecimal string representation.
>
> ### Syntax
>
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > The hexadecimal string representation.
>
> ### Remarks
>
> ### Requirements
>
> **Namespace:** Sansar.Script\
> **Assembly:** Sansar.Script (in Sansar.Script.dll)\
> **Assembly Versions:** 1.0.0.0
>
> ***

***
