Struct UserDataSlot<V>
Uniquely identifies user data which can be associated with any object.
Implements
Namespace: DotNext
Assembly: DotNext.dll
Syntax
public struct UserDataSlot<V> : IEquatable<UserDataSlot<V>>
Type Parameters
| Name | Description |
|---|---|
| V |
Methods
| Improve this Doc View SourceAllocate()
Allocates a new data slot.
Declaration
public static UserDataSlot<V> Allocate()
Returns
| Type | Description |
|---|---|
| UserDataSlot<V> | Allocated data slot. |
Equals(UserDataSlot<V>)
Checks whether the two data slots are the same.
Declaration
public bool Equals(UserDataSlot<V> other)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<V> | other | Other data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
Equals(Object)
Checks whether the two data slots are the same.
Declaration
public override bool Equals(object other)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | other | Other data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
GetHashCode()
Computes hash code for this data slot.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | Hash code. |
ToString()
Gets textual representation of this data slot useful for debugging.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | Textual representation of this data slot. |
Operators
| Improve this Doc View SourceEquality(UserDataSlot<V>, UserDataSlot<V>)
Checks whether the two data slots are the same.
Declaration
public static bool operator ==(UserDataSlot<V> first, UserDataSlot<V> second)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<V> | first | The first data slot to check. |
| UserDataSlot<V> | second | The second data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | true if both data slots identifies the same data key. |
Inequality(UserDataSlot<V>, UserDataSlot<V>)
Checks whether the two data slots are not the same.
Declaration
public static bool operator !=(UserDataSlot<V> first, UserDataSlot<V> second)
Parameters
| Type | Name | Description |
|---|---|---|
| UserDataSlot<V> | first | The first data slot to check. |
| UserDataSlot<V> | second | The second data slot to check. |
Returns
| Type | Description |
|---|---|
| Boolean | false if both data slots identifies the same data key. |