# CustomResourceSnapshot Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot.md)
- Kind: `Methods`
- Members: `7`

An immutable snapshot of the state of a resource.

## <Clone>$

- Name: `<Clone>$`
- Returns: [CustomResourceSnapshot](/reference/api/csharp/aspire.hosting/customresourcesnapshot.md)

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

## Equals(object?)

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

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

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

- Name: `Equals(CustomResourceSnapshot?)`
- Returns: `bool`

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

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

## Parameters

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

## Returns

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

## op_Equality(CustomResourceSnapshot?, CustomResourceSnapshot?)

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

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

## Parameters

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

## op_Inequality(CustomResourceSnapshot?, CustomResourceSnapshot?)

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

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

## Parameters

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

## ToString

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

Returns a string that represents the current object.

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

## Returns

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