Struct Number
- Namespace
- SixLabors.ImageSharp
- Assembly
- SixLabors.ImageSharp.dll
Represents an integral number.
public struct Number : IEquatable<Number>, IComparable<Number>
- Implements
- Inherited Members
Constructors
Number(int)
Initializes a new instance of the Number struct.
public Number(int value)
Parameters
valueintThe value of the number.
Number(uint)
Initializes a new instance of the Number struct.
public Number(uint value)
Parameters
valueuintThe value of the number.
Methods
CompareTo(Number)
public int CompareTo(Number other)
Parameters
otherNumber
Returns
Equals(Number)
public bool Equals(Number other)
Parameters
otherNumber
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
ToString(IFormatProvider)
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information.
public string ToString(IFormatProvider provider)
Parameters
providerIFormatProviderAn object that supplies culture-specific formatting information.
Returns
- string
The string representation of the value of this instance, which consists of a sequence of digits ranging from 0 to 9, without a sign or leading zeros.
Operators
operator ==(Number, Number)
Determines whether the specified Number instances are considered equal.
public static bool operator ==(Number left, Number right)
Parameters
Returns
explicit operator int(Number)
public static explicit operator int(Number number)
Parameters
Returns
explicit operator ushort(Number)
public static explicit operator ushort(Number number)
Parameters
Returns
explicit operator uint(Number)
public static explicit operator uint(Number number)
Parameters
Returns
operator >(Number, Number)
public static bool operator >(Number left, Number right)
Parameters
Returns
operator >=(Number, Number)
public static bool operator >=(Number left, Number right)
Parameters
Returns
implicit operator Number(int)
Converts the specified int to an instance of this type.
public static implicit operator Number(int value)
Parameters
valueintThe value.
Returns
implicit operator Number(ushort)
Converts the specified ushort to an instance of this type.
public static implicit operator Number(ushort value)
Parameters
valueushortThe value.
Returns
implicit operator Number(uint)
Converts the specified uint to an instance of this type.
public static implicit operator Number(uint value)
Parameters
valueuintThe value.
Returns
operator !=(Number, Number)
Determines whether the specified Number instances are not considered equal.
public static bool operator !=(Number left, Number right)
Parameters
Returns
operator <(Number, Number)
public static bool operator <(Number left, Number right)
Parameters
Returns
operator <=(Number, Number)
public static bool operator <=(Number left, Number right)