# Int32OrStringV1 Methods

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md)
- Kind: `Methods`
- Members: `18`

Represents a value that can be either a 32-bit integer or a string.

## <Clone>$

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

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

## Deconstruct(int?, string?)

- Name: `Deconstruct(int?, string?)`

```csharp
public record Int32OrStringV1
{
    public void Deconstruct(
        out int? Number,
        out string? Text)
    {
        // ...
    }
}
```

## Parameters

- `Number` (`int?`)
- `Text` (`string?`)

## Equals(int)

- Name: `Equals(int)`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Determines whether the current instance is equal to another integer.

```csharp
public record Int32OrStringV1
{
    public bool Equals(
        int other)
    {
        // ...
    }
}
```

## Parameters

- `other` (`int`)
  The integer to compare with.

## Returns

`bool` -- True if the current instance is equal to the other integer; otherwise, false.

## Equals(string?)

- Name: `Equals(string?)`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Determines whether the current instance is equal to another string.

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

## Parameters

- `other` (`string?`)
  The string to compare with.

## Returns

`bool` -- True if the current instance is equal to the other string; otherwise, false.

## Equals(object?)

- Name: `Equals(object?)`
- Modifiers: `override`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

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

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

- Name: `Equals(Int32OrStringV1?)`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

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

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

## Parameters

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

## Returns

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

## op_Equality(Int32OrStringV1?, int)

- Name: `op_Equality(Int32OrStringV1?, int)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Compares an instance of Int32OrStringV1 to an integer for equality.

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  An instance of Int32OrStringV1.
- `right` (`int`)
  The integer instance to check against.

## Returns

`bool` -- a boolean value indicating whether the two instances are equal.

## op_Equality(Int32OrStringV1?, string?)

- Name: `op_Equality(Int32OrStringV1?, string?)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Compares an instance of Int32OrStringV1 to a string for equality.

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  An instance of Int32OrStringV1.
- `right` (`string?`)
  The string instance to check against.

## Returns

`bool` -- a boolean value indicating whether the two instances are equal.

## op_Equality(Int32OrStringV1?, Int32OrStringV1?)

- Name: `op_Equality(Int32OrStringV1?, Int32OrStringV1?)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
- `right` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))

## op_Explicit(Int32OrStringV1)

- Name: `op_Explicit(Int32OrStringV1)`
- Modifiers: `static`
- Returns: `int`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Gets the value as a 32-bit integer.

```csharp
public record Int32OrStringV1
{
    public static explicit operator int(
        Int32OrStringV1 value)
    {
        // ...
    }
}
```

## Parameters

- `value` ([Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  The value to get.

## Exceptions

- `InvalidCastException` -- Thrown if the value isn't a valid integer.

## op_Explicit(Int32OrStringV1?)

- Name: `op_Explicit(Int32OrStringV1?)`
- Modifiers: `static` `nullable`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Gets the value as a string.

```csharp
public record Int32OrStringV1
{
    public static explicit operator string?(
        Int32OrStringV1? value)
    {
        // ...
    }
}
```

## Parameters

- `value` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  The value to get.

## Returns

`string?` -- The value as a string.

## op_Implicit(int)

- Name: `op_Implicit(int)`
- Modifiers: `static`
- Returns: [Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Gets the integer value as a Int32OrStringV1 instance.

```csharp
public record Int32OrStringV1
{
    public static implicit operator Int32OrStringV1(
        int value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`int`)
  The integer to get.

## Returns

[Int32OrStringV1](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md) -- An Int32OrStringV1 instance representing the integer value.

## op_Implicit(string?)

- Name: `op_Implicit(string?)`
- Modifiers: `static` `nullable`
- Returns: [Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Gets the string value as a Int32OrStringV1 instance.

```csharp
public record Int32OrStringV1
{
    public static implicit operator Int32OrStringV1?(
        string? value)
    {
        // ...
    }
}
```

## Parameters

- `value` (`string?`)
  The string to get

## Returns

[Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md) -- An Int32OrStringV1 instance representing the string value.

## op_Inequality(Int32OrStringV1?, int)

- Name: `op_Inequality(Int32OrStringV1?, int)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Compares an instance of Int32OrStringV1 to an integer for equality.

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  An instance of Int32OrStringV1.
- `right` (`int`)
  The integer instance to check against.

## Returns

`bool` -- a boolean value indicating whether the two instances are not equal.

## op_Inequality(Int32OrStringV1?, string?)

- Name: `op_Inequality(Int32OrStringV1?, string?)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

Compares an instance of Int32OrStringV1 to a string for equality.

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
  An instance of Int32OrStringV1.
- `right` (`string?`)
  The string instance to check against.

## Returns

`bool` -- a boolean value indicating whether the two instances are not equal.

## op_Inequality(Int32OrStringV1?, Int32OrStringV1?)

- Name: `op_Inequality(Int32OrStringV1?, Int32OrStringV1?)`
- Modifiers: `static`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs)

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

## Parameters

- `left` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))
- `right` ([Int32OrStringV1?](/reference/api/csharp/aspire.hosting.kubernetes/int32orstringv1.md))

## ToString

- Name: `ToString`
- Modifiers: `override` `nullable`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/Int32OrStringV1.cs#L61)

Returns a string representation of the current instance.

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

## Returns

`string?` -- The string representation of the value.
