INumber<TSelf> 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
定義數位類型。
generic <typename TSelf>
where TSelf : INumber<TSelf>public interface class INumber : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
where TSelf : INumber<TSelf>public interface class INumber : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IComparisonOperators<TSelf, TSelf, bool>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IModulusOperators<TSelf, TSelf, TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::INumberBase<TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface INumber<TSelf> : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumber<TSelf>
public interface INumber<TSelf> : IComparable, IComparable<TSelf>, IEquatable<TSelf>, IParsable<TSelf>, ISpanParsable<TSelf>, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IComparisonOperators<TSelf,TSelf,bool>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IModulusOperators<TSelf,TSelf,TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.INumberBase<TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumber<TSelf>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumber<'Self>)>
type INumber<'Self (requires 'Self :> INumber<'Self>)> = interface
interface IComparable
interface IComparable<'Self (requires 'Self :> INumber<'Self>)>
interface IEquatable<'Self (requires 'Self :> INumber<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IComparisonOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumber<'Self>)>
interface IModulusOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface INumberBase<'Self (requires 'Self :> INumber<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumber<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumber<'Self> and 'Self :> INumber<'Self>)>
Public Interface INumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable, IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Public Interface INumber(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IComparable, IComparable(Of TSelf), IComparisonOperators(Of TSelf, TSelf, Boolean), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IModulusOperators(Of TSelf, TSelf, TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), INumberBase(Of TSelf), IParsable(Of TSelf), ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf), IUtf8SpanParsable(Of TSelf)
類型參數
- TSelf
實作 介面的類型。
- 衍生
- 實作
-
IComparable IComparable<TSelf> IEquatable<TSelf> IFormattable IParsable<TSelf> ISpanFormattable ISpanParsable<TSelf> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<TSelf,TSelf> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<TSelf> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<TSelf> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<TSelf,TSelf,TSelf> INumberBase<TSelf> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<TSelf>
方法
Clamp(TSelf, TSelf, TSelf) |
將值夾在內含最小值和最大值。 |
CompareTo(Object) |
比較目前實例與相同型別的另一個物件,並傳回整數,指出目前的實例是否在排序順序中與其他對象位於相同位置。 (繼承來源 IComparable) |
CompareTo(T) |
比較目前實例與相同型別的另一個物件,並傳回整數,指出目前的實例是否在排序順序中與其他對象位於相同位置。 (繼承來源 IComparable<T>) |
CopySign(TSelf, TSelf) |
將值的正負號複製到另一個值的正負號。 |
Equals(T) |
指出目前的物件是否等於相同類型的另一個物件。 (繼承來源 IEquatable<T>) |
Max(TSelf, TSelf) |
比較兩個值與計算,這兩個值更大。 |
MaxNumber(TSelf, TSelf) |
比較兩個值與計算,如果輸入是 |
Min(TSelf, TSelf) |
比較兩個值與計算比較較少。 |
MinNumber(TSelf, TSelf) |
比較兩個值與計算,如果輸入 |
Sign(TSelf) |
計算值的符號。 |
ToString(String, IFormatProvider) |
使用指定的格式,格式化目前實例的值。 (繼承來源 IFormattable) |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
嘗試將目前實例的值格式化為UTF-8到提供的位元組範圍。 (繼承來源 IUtf8SpanFormattable) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
嘗試將目前實例的值格式化為提供的字元範圍。 (繼承來源 ISpanFormattable) |
明確介面實作
IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
嘗試將目前實例的值格式化為UTF-8到提供的位元組範圍。 (繼承來源 INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
將UTF-8字元的範圍剖析為值。 (繼承來源 INumberBase<TSelf>) |
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
嘗試將UTF-8字元的範圍剖析為值。 (繼承來源 INumberBase<TSelf>) |