Int32OrStringV1
Recordsealednet10.0
Represents a value that can be either a 32-bit integer or a string.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed record Int32OrStringV1 : System.IEquatable<Aspire.Hosting.Kubernetes.Resources.Int32OrStringV1>, System.IEquatable<int>, System.IEquatable<string>{ // ...}IEquatable<Int32OrStringV1>IEquatable<int>IEquatable<string>
24 members
Remarks
Section titled 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.
Constructors3
Section titled Constructors Represents a value that can be either a 32-bit integer or a string.
Initializes a new instance of the
Int32OrStringV1 class with a 32-bit integer value. Initializes a new instance of the
Int32OrStringV1 class with a string value. Properties3
Section titled PropertiesNumberget; initint?Textget; initstring?Valuegetstring? 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.
Methods18
Section titled MethodsboolIndicates whether the current object is equal to another object of the same type.
bool Compares an instance of Int32OrStringV1 to an integer for equality.
bool Compares an instance of Int32OrStringV1 to a string for equality.
bool Compares an instance of Int32OrStringV1 to an integer for equality.
bool Compares an instance of Int32OrStringV1 to a string for equality.