Show / Hide Table of Contents

# Struct EntitySharedReference

##### Implements

IEquatable<EntitySharedReference>

###### Namespace: LiteEntitySystem

###### Assembly: LiteEntitySystem.dll

##### Syntax

    public readonly struct EntitySharedReference : IEquatable<EntitySharedReference>

### Constructors

#### EntitySharedReference(EntityLogic)

##### Declaration

    public EntitySharedReference(EntityLogic entity)

##### Parameters

Type | Name | Description
--- | --- | ---
EntityLogic | entity |

#### EntitySharedReference(ushort, byte)

##### Declaration

    public EntitySharedReference(ushort id, byte version)

##### Parameters

Type | Name | Description
--- | --- | ---
ushort | id |
byte | version |

### Fields

#### Empty

##### Declaration

    public static readonly EntitySharedReference Empty

##### Field Value

Type | Description
--- | ---
EntitySharedReference |

#### Id

##### Declaration

    public readonly ushort Id

##### Field Value

Type | Description
--- | ---
ushort |

#### Version

##### Declaration

    public readonly byte Version

##### Field Value

Type | Description
--- | ---
byte |

### Properties

#### IsInvalid

##### Declaration

    public bool IsInvalid { get; }

##### Property Value

Type | Description
--- | ---
bool |

#### IsLocal

##### Declaration

    public bool IsLocal { get; }

##### Property Value

Type | Description
--- | ---
bool |

#### IsValid

##### Declaration

    public bool IsValid { get; }

##### Property Value

Type | Description
--- | ---
bool |

### Methods

#### Equals(EntitySharedReference)

Indicates whether the current object is equal to another object of the same type.

##### Declaration

    public bool Equals(EntitySharedReference other)

##### Parameters

Type | Name | Description
--- | --- | ---
EntitySharedReference | other | An object to compare with this object.

##### Returns

Type | Description
--- | ---
bool | true if the current object is equal to the `other` parameter; otherwise, false.

#### Equals(object)

Indicates whether this instance and a specified object are equal.

##### Declaration

    public override bool Equals(object obj)

##### Parameters

Type | Name | Description
--- | --- | ---
object | obj | The object to compare with the current instance.

##### Returns

Type | Description
--- | ---
bool | true if `obj` and this instance are the same type and represent the same value; otherwise, false.

##### Overrides

ValueType.Equals(object)

#### GetHashCode()

Returns the hash code for this instance.

##### Declaration

    public override int GetHashCode()

##### Returns

Type | Description
--- | ---
int | A 32-bit signed integer that is the hash code for this instance.

##### Overrides

ValueType.GetHashCode()

#### ToString()

Returns the fully qualified type name of this instance.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
string | The fully qualified type name.

##### Overrides

ValueType.ToString()

### Operators

#### operator ==(EntitySharedReference, EntitySharedReference)

##### Declaration

    public static bool operator ==(EntitySharedReference obj1, EntitySharedReference obj2)

##### Parameters

Type | Name | Description
--- | --- | ---
EntitySharedReference | obj1 |
EntitySharedReference | obj2 |

##### Returns

Type | Description
--- | ---
bool |

#### implicit operator EntitySharedReference(EntityLogic)

##### Declaration

    public static implicit operator EntitySharedReference(EntityLogic entity)

##### Parameters

Type | Name | Description
--- | --- | ---
EntityLogic | entity |

##### Returns

Type | Description
--- | ---
EntitySharedReference |

#### operator !=(EntitySharedReference, EntitySharedReference)

##### Declaration

    public static bool operator !=(EntitySharedReference obj1, EntitySharedReference obj2)

##### Parameters

Type | Name | Description
--- | --- | ---
EntitySharedReference | obj1 |
EntitySharedReference | obj2 |

##### Returns

Type | Description
--- | ---
bool |

### Implements

IEquatable<T>