INumberBase<TSelf> Antarmuka
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendefinisikan dasar jenis angka lainnya.
generic <typename TSelf>
where TSelf : INumberBase<TSelf>public interface class INumberBase : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
generic <typename TSelf>
where TSelf : INumberBase<TSelf>public interface class INumberBase : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, IUtf8SpanFormattable, IUtf8SpanParsable<TSelf>, System::Numerics::IAdditionOperators<TSelf, TSelf, TSelf>, System::Numerics::IAdditiveIdentity<TSelf, TSelf>, System::Numerics::IDecrementOperators<TSelf>, System::Numerics::IDivisionOperators<TSelf, TSelf, TSelf>, System::Numerics::IEqualityOperators<TSelf, TSelf, bool>, System::Numerics::IIncrementOperators<TSelf>, System::Numerics::IMultiplicativeIdentity<TSelf, TSelf>, System::Numerics::IMultiplyOperators<TSelf, TSelf, TSelf>, System::Numerics::ISubtractionOperators<TSelf, TSelf, TSelf>, System::Numerics::IUnaryNegationOperators<TSelf, TSelf>, System::Numerics::IUnaryPlusOperators<TSelf, TSelf>
public interface INumberBase<TSelf> : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumberBase<TSelf>
public interface INumberBase<TSelf> : IEquatable<TSelf>, IParsable<TSelf>, ISpanFormattable, ISpanParsable<TSelf>, IUtf8SpanFormattable, IUtf8SpanParsable<TSelf>, System.Numerics.IAdditionOperators<TSelf,TSelf,TSelf>, System.Numerics.IAdditiveIdentity<TSelf,TSelf>, System.Numerics.IDecrementOperators<TSelf>, System.Numerics.IDivisionOperators<TSelf,TSelf,TSelf>, System.Numerics.IEqualityOperators<TSelf,TSelf,bool>, System.Numerics.IIncrementOperators<TSelf>, System.Numerics.IMultiplicativeIdentity<TSelf,TSelf>, System.Numerics.IMultiplyOperators<TSelf,TSelf,TSelf>, System.Numerics.ISubtractionOperators<TSelf,TSelf,TSelf>, System.Numerics.IUnaryNegationOperators<TSelf,TSelf>, System.Numerics.IUnaryPlusOperators<TSelf,TSelf> where TSelf : INumberBase<TSelf>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
type INumberBase<'Self (requires 'Self :> INumberBase<'Self>)> = interface
interface IEquatable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IFormattable
interface IParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface ISpanFormattable
interface ISpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<'Self (requires 'Self :> INumberBase<'Self>)>
interface IAdditionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IAdditiveIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IDecrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IDivisionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IEqualityOperators<'Self, 'Self, bool (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IIncrementOperators<'Self (requires 'Self :> INumberBase<'Self>)>
interface IMultiplicativeIdentity<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IMultiplyOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface ISubtractionOperators<'Self, 'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryNegationOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
interface IUnaryPlusOperators<'Self, 'Self (requires 'Self :> INumberBase<'Self> and 'Self :> INumberBase<'Self>)>
Public Interface INumberBase(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), IParsable(Of TSelf), ISpanFormattable, ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf)
Public Interface INumberBase(Of TSelf)
Implements IAdditionOperators(Of TSelf, TSelf, TSelf), IAdditiveIdentity(Of TSelf, TSelf), IDecrementOperators(Of TSelf), IDivisionOperators(Of TSelf, TSelf, TSelf), IEqualityOperators(Of TSelf, TSelf, Boolean), IEquatable(Of TSelf), IIncrementOperators(Of TSelf), IMultiplicativeIdentity(Of TSelf, TSelf), IMultiplyOperators(Of TSelf, TSelf, TSelf), IParsable(Of TSelf), ISpanFormattable, ISpanParsable(Of TSelf), ISubtractionOperators(Of TSelf, TSelf, TSelf), IUnaryNegationOperators(Of TSelf, TSelf), IUnaryPlusOperators(Of TSelf, TSelf), IUtf8SpanFormattable, IUtf8SpanParsable(Of TSelf)
Jenis parameter
- TSelf
Jenis yang mengimplementasikan antarmuka.
- Turunan
- Penerapan
-
IEquatable<TSelf> IFormattable IParsable<TSelf> ISpanFormattable ISpanParsable<TSelf> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<TSelf,TSelf> IDecrementOperators<TSelf> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<TSelf> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<TSelf,TSelf,TSelf> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<TSelf>
Properti
One |
Mendapatkan nilai |
Radix |
Mendapatkan radix, atau basis, untuk jenisnya. |
Zero |
Mendapatkan nilai |
Metode
Abs(TSelf) |
Menghitung absolut nilai. |
CreateChecked<TOther>(TOther) |
Membuat instans jenis saat ini dari nilai, melemparkan pengecualian luapan untuk nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
CreateSaturating<TOther>(TOther) |
Membuat instans jenis saat ini dari nilai, menjenuhkan nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
CreateTruncating<TOther>(TOther) |
Membuat instans jenis saat ini dari nilai, memotong nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
Equals(T) |
Menunjukkan apakah objek saat ini sama dengan objek lain dengan jenis yang sama. (Diperoleh dari IEquatable<T>) |
IsCanonical(TSelf) |
Menentukan apakah nilai berada dalam representasi kanonisnya. |
IsComplexNumber(TSelf) |
Menentukan apakah nilai mewakili bilangan kompleks. |
IsEvenInteger(TSelf) |
Menentukan apakah nilai mewakili angka integral yang merata. |
IsFinite(TSelf) |
Menentukan apakah nilai terbatas. |
IsImaginaryNumber(TSelf) |
Menentukan apakah nilai mewakili angka imajiner murni. |
IsInfinity(TSelf) |
Menentukan apakah nilai tidak terbatas. |
IsInteger(TSelf) |
Menentukan apakah nilai menunjukkan angka integral. |
IsNaN(TSelf) |
Menentukan apakah nilainya adalah NaN. |
IsNegative(TSelf) |
Menentukan apakah nilai mewakili bilangan riil negatif. |
IsNegativeInfinity(TSelf) |
Menentukan apakah nilai adalah tak terbatas negatif. |
IsNormal(TSelf) |
Menentukan apakah nilai normal. |
IsOddInteger(TSelf) |
Menentukan apakah nilai mewakili angka integral ganjil. |
IsPositive(TSelf) |
Menentukan apakah nilai mewakili nol atau angka riil positif. |
IsPositiveInfinity(TSelf) |
Menentukan apakah nilai adalah infinitas positif. |
IsRealNumber(TSelf) |
Menentukan apakah nilai mewakili angka riil. |
IsSubnormal(TSelf) |
Menentukan apakah nilainya subnormal. |
IsZero(TSelf) |
Menentukan apakah nilai adalah nol. |
MaxMagnitude(TSelf, TSelf) |
Membandingkan dua nilai dengan komputasi yang memiliki besaran lebih besar. |
MaxMagnitudeNumber(TSelf, TSelf) |
Membandingkan dua nilai dengan komputasi yang memiliki besaran lebih besar dan mengembalikan nilai lain jika input adalah |
MinMagnitude(TSelf, TSelf) |
Membandingkan dua nilai dengan komputasi yang memiliki besaran lebih kecil. |
MinMagnitudeNumber(TSelf, TSelf) |
Membandingkan dua nilai dengan komputasi yang memiliki besaran lebih kecil dan mengembalikan nilai lainnya jika input adalah |
MultiplyAddEstimate(TSelf, TSelf, TSelf) |
Mendefinisikan dasar jenis angka lainnya. |
Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
Menguraikan rentang karakter UTF-8 ke dalam nilai. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Mengurai rentang karakter ke dalam nilai. |
Parse(String, NumberStyles, IFormatProvider) |
Mengurai string menjadi nilai. |
ToString(String, IFormatProvider) |
Memformat nilai instans saat ini menggunakan format yang ditentukan. (Diperoleh dari IFormattable) |
TryConvertFromChecked<TOther>(TOther, TSelf) |
Mencoba mengonversi nilai menjadi instans dari jenis saat ini, melemparkan pengecualian luapan untuk nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryConvertFromSaturating<TOther>(TOther, TSelf) |
Mencoba mengonversi nilai menjadi instans dari jenis saat ini, menjenuhkan nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryConvertFromTruncating<TOther>(TOther, TSelf) |
Mencoba mengonversi nilai menjadi instans dari jenis saat ini, memotong nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryConvertToChecked<TOther>(TSelf, TOther) |
Mencoba mengonversi instans dari jenis saat ini ke jenis lain, melemparkan pengecualian luapan untuk nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryConvertToSaturating<TOther>(TSelf, TOther) |
Mencoba mengonversi instans jenis saat ini ke jenis lain, menjenuhkan nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryConvertToTruncating<TOther>(TSelf, TOther) |
Mencoba mengonversi instans jenis saat ini ke jenis lain, memotong nilai apa pun yang berada di luar rentang yang dapat diwakili dari jenis saat ini. |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Mencoba memformat nilai instans saat ini sebagai UTF-8 ke dalam rentang byte yang disediakan. (Diperoleh dari IUtf8SpanFormattable) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Mencoba memformat nilai instans saat ini ke dalam rentang karakter yang disediakan. (Diperoleh dari ISpanFormattable) |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, TSelf) |
Mencoba mengurai rentang karakter UTF-8 ke dalam nilai. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, TSelf) |
Mencoba mengurai rentang karakter ke dalam nilai. |
TryParse(String, NumberStyles, IFormatProvider, TSelf) |
Mencoba mengurai string ke dalam nilai. |
Implementasi Antarmuka Eksplisit
IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Mendefinisikan dasar jenis angka lainnya. |
IUtf8SpanParsable<TSelf>.Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Menguraikan rentang karakter UTF-8 ke dalam nilai. |
IUtf8SpanParsable<TSelf>.TryParse(ReadOnlySpan<Byte>, IFormatProvider, TSelf) |
Mencoba mengurai rentang karakter UTF-8 ke dalam nilai. |
Berlaku untuk
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk