Share via


Int32OrStringV1 Class

Definition

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

public sealed class Int32OrStringV1 : IEquatable<Aspire.Hosting.Kubernetes.Resources.Int32OrStringV1>, IEquatable<int>, IEquatable<string>
type Int32OrStringV1 = class
    interface IEquatable<int>
    interface IEquatable<string>
    interface IEquatable<Int32OrStringV1>
Public NotInheritable Class Int32OrStringV1
Implements IEquatable(Of Int32OrStringV1), IEquatable(Of Integer), IEquatable(Of String)
Inheritance
Int32OrStringV1
Implements

Remarks

This class provides functionality to handle values that could be either an integer or a string. It supports implicit and explicit conversions, equality comparisons, and YAML serialization/deserialization handling.

Constructors

Int32OrStringV1(Int32)

Initializes a new instance of the Int32OrStringV1 class with a 32-bit integer value.

Int32OrStringV1(Nullable<Int32>, String)

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

Int32OrStringV1(String)

Initializes a new instance of the Int32OrStringV1 class with a string value.

Properties

Number
Text
Value

Gets the string value if the instance represents a string; otherwise, returns the string representation of the 32-bit integer value if the instance represents an integer.

Methods

<Clone>$()
Deconstruct(Nullable<Int32>, String)
Equals(Int32)

Determines whether the current instance is equal to another integer.

Equals(Int32OrStringV1)
Equals(Object)
Equals(String)

Determines whether the current instance is equal to another string.

GetHashCode()
ToString()

Returns a string representation of the current instance.

Operators

Equality(Int32OrStringV1, Int32)

Compares an instance of Int32OrStringV1 to an integer for equality.

Equality(Int32OrStringV1, Int32OrStringV1)
Equality(Int32OrStringV1, String)

Compares an instance of Int32OrStringV1 to a string for equality.

Explicit(Int32OrStringV1 to Int32)

Gets the value as a 32-bit integer.

Explicit(Int32OrStringV1 to String)

Gets the value as a string.

Implicit(Int32 to Int32OrStringV1)

Gets the integer value as a Int32OrStringV1 instance.

Implicit(String to Int32OrStringV1)

Gets the string value as a Int32OrStringV1 instance.

Inequality(Int32OrStringV1, Int32)

Compares an instance of Int32OrStringV1 to an integer for equality.

Inequality(Int32OrStringV1, Int32OrStringV1)
Inequality(Int32OrStringV1, String)

Compares an instance of Int32OrStringV1 to a string for equality.

Applies to