# NetworkIdentifier Methods

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

A network identifier used to specify the network context for resources within an Aspire application model.

## <Clone>$

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

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

## Deconstruct(string)

- Name: `Deconstruct(string)`

```csharp
public record NetworkIdentifier
{
    public void Deconstruct(
        out string Value)
    {
        // ...
    }
}
```

## Parameters

- `Value` (`string`)

## Equals(object?)

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

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

```csharp
public record NetworkIdentifier
{
    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(NetworkIdentifier?)

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

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

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

## Parameters

- `other` ([NetworkIdentifier?](/reference/api/csharp/aspire.hosting/networkidentifier.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 NetworkIdentifier
{
    public override int GetHashCode()
    {
        // ...
    }
}
```

## Returns

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

## op_Equality(NetworkIdentifier?, NetworkIdentifier?)

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

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

## Parameters

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

## op_Inequality(NetworkIdentifier?, NetworkIdentifier?)

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

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

## Parameters

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

## ToString

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

Returns a string that represents the current object.

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

## Returns

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