# NetworkEndpointSnapshot Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [NetworkEndpointSnapshot](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md)
- Kind: `Methods`
- Members: `8`

Represents an AllocatedEndpoint snapshot associated with a specific network.

## <Clone>$

- Name: `<Clone>$`
- Modifiers: `virtual`
- Returns: [NetworkEndpointSnapshot](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md)

```csharp
public record NetworkEndpointSnapshot
{
    public virtual NetworkEndpointSnapshot <Clone>$()
    {
        // ...
    }
}
```

## Deconstruct(ValueSnapshot<AllocatedEndpoint>, NetworkIdentifier)

- Name: `Deconstruct(ValueSnapshot<AllocatedEndpoint>, NetworkIdentifier)`

```csharp
public record NetworkEndpointSnapshot
{
    public void Deconstruct(
        out ValueSnapshot<AllocatedEndpoint> Snapshot,
        out NetworkIdentifier NetworkID)
    {
        // ...
    }
}
```

## Parameters

- `Snapshot` (`ValueSnapshot<AllocatedEndpoint>`)
- `NetworkID` ([NetworkIdentifier](/reference/api/csharp/aspire.hosting/networkidentifier.md))

## Equals(object?)

- Name: `Equals(object?)`
- Modifiers: `override`
- Returns: `bool`

Determines whether the specified object is equal to the current object.

```csharp
public record NetworkEndpointSnapshot
{
    public override bool Equals(
        object? obj)
    {
        // ...
    }
}
```

## Parameters

- `obj` (`object?`)
  The object to compare with the current object.

## Returns

`bool` -- `true` if the specified object is equal to the current object; otherwise, `false`.

## Equals(NetworkEndpointSnapshot?)

- Name: `Equals(NetworkEndpointSnapshot?)`
- Modifiers: `virtual`
- Returns: `bool`

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

```csharp
public record NetworkEndpointSnapshot
{
    public virtual bool Equals(
        NetworkEndpointSnapshot? other)
    {
        // ...
    }
}
```

## Parameters

- `other` ([NetworkEndpointSnapshot?](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md))
  An object to compare with this object.

## Returns

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

## GetHashCode

- Name: `GetHashCode`
- Modifiers: `override`
- Returns: `int`

Serves as the default hash function.

```csharp
public record NetworkEndpointSnapshot
{
    public override int GetHashCode()
    {
        // ...
    }
}
```

## Returns

`int` -- A hash code for the current object.

## op_Equality(NetworkEndpointSnapshot?, NetworkEndpointSnapshot?)

- Name: `op_Equality(NetworkEndpointSnapshot?, NetworkEndpointSnapshot?)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public record NetworkEndpointSnapshot
{
    public static bool operator ==(
        NetworkEndpointSnapshot? left,
        NetworkEndpointSnapshot? right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([NetworkEndpointSnapshot?](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md))
- `right` ([NetworkEndpointSnapshot?](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md))

## op_Inequality(NetworkEndpointSnapshot?, NetworkEndpointSnapshot?)

- Name: `op_Inequality(NetworkEndpointSnapshot?, NetworkEndpointSnapshot?)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public record NetworkEndpointSnapshot
{
    public static bool operator !=(
        NetworkEndpointSnapshot? left,
        NetworkEndpointSnapshot? right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([NetworkEndpointSnapshot?](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md))
- `right` ([NetworkEndpointSnapshot?](/reference/api/csharp/aspire.hosting/networkendpointsnapshot.md))

## ToString

- Name: `ToString`
- Modifiers: `override`
- Returns: `string`

Returns a string that represents the current object.

```csharp
public record NetworkEndpointSnapshot
{
    public override string ToString()
    {
        // ...
    }
}
```

## Returns

`string` -- A string that represents the current object.
