Table of Contents

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

value int

The value of the number.

Number(uint)

Initializes a new instance of the Number struct.

public Number(uint value)

Parameters

value uint

The value of the number.

Methods

CompareTo(Number)

public int CompareTo(Number other)

Parameters

other Number

Returns

int

Equals(Number)

public bool Equals(Number other)

Parameters

other Number

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

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

provider IFormatProvider

An 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

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool

explicit operator int(Number)

Converts the specified Number to a int.

public static explicit operator int(Number number)

Parameters

number Number

The Number to convert.

Returns

int

explicit operator ushort(Number)

Converts the specified Number to a ushort.

public static explicit operator ushort(Number number)

Parameters

number Number

The Number to convert.

Returns

ushort

explicit operator uint(Number)

Converts the specified Number to a uint.

public static explicit operator uint(Number number)

Parameters

number Number

The Number to convert.

Returns

uint

operator >(Number, Number)

Determines whether the first Number is more than the second Number.

public static bool operator >(Number left, Number right)

Parameters

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool

operator >=(Number, Number)

Determines whether the first Number is more than or equal to the second Number.

public static bool operator >=(Number left, Number right)

Parameters

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool

implicit operator Number(int)

Converts the specified int to an instance of this type.

public static implicit operator Number(int value)

Parameters

value int

The value.

Returns

Number

implicit operator Number(ushort)

Converts the specified ushort to an instance of this type.

public static implicit operator Number(ushort value)

Parameters

value ushort

The value.

Returns

Number

implicit operator Number(uint)

Converts the specified uint to an instance of this type.

public static implicit operator Number(uint value)

Parameters

value uint

The value.

Returns

Number

operator !=(Number, Number)

Determines whether the specified Number instances are not considered equal.

public static bool operator !=(Number left, Number right)

Parameters

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool

operator <(Number, Number)

Determines whether the first Number is less than the second Number.

public static bool operator <(Number left, Number right)

Parameters

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool

operator <=(Number, Number)

Determines whether the first Number is less than or equal to the second Number.

public static bool operator <=(Number left, Number right)

Parameters

left Number

The first Number to compare.

right Number

The second Number to compare.

Returns

bool