UInt16 Yapı
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Önemli
Bu API, CLS uyumlu değildir.
16 bit işaretsiz tamsayıyı temsil eder.
public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IFormattable
public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, ISpanFormattable
public value class System::UInt16 : IComparable<System::UInt16>, IConvertible, IEquatable<System::UInt16>, IParsable<System::UInt16>, ISpanParsable<System::UInt16>, System::Numerics::IAdditionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IAdditiveIdentity<System::UInt16, System::UInt16>, System::Numerics::IBinaryInteger<System::UInt16>, System::Numerics::IBinaryNumber<System::UInt16>, System::Numerics::IBitwiseOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IComparisonOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IDecrementOperators<System::UInt16>, System::Numerics::IDivisionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IEqualityOperators<System::UInt16, System::UInt16, bool>, System::Numerics::IIncrementOperators<System::UInt16>, System::Numerics::IMinMaxValue<System::UInt16>, System::Numerics::IModulusOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IMultiplicativeIdentity<System::UInt16, System::UInt16>, System::Numerics::IMultiplyOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::INumber<System::UInt16>, System::Numerics::INumberBase<System::UInt16>, System::Numerics::IShiftOperators<System::UInt16, int, System::UInt16>, System::Numerics::ISubtractionOperators<System::UInt16, System::UInt16, System::UInt16>, System::Numerics::IUnaryNegationOperators<System::UInt16, System::UInt16>, System::Numerics::IUnaryPlusOperators<System::UInt16, System::UInt16>, System::Numerics::IUnsignedNumber<System::UInt16>
public value class System::UInt16 : IComparable, IConvertible, IFormattable
public value class System::UInt16 : IComparable, IComparable<System::UInt16>, IEquatable<System::UInt16>, IFormattable
[System.CLSCompliant(false)]
public struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, ISpanFormattable
[System.CLSCompliant(false)]
public readonly struct UInt16 : IComparable<ushort>, IConvertible, IEquatable<ushort>, IParsable<ushort>, ISpanParsable<ushort>, System.Numerics.IAdditionOperators<ushort,ushort,ushort>, System.Numerics.IAdditiveIdentity<ushort,ushort>, System.Numerics.IBinaryInteger<ushort>, System.Numerics.IBinaryNumber<ushort>, System.Numerics.IBitwiseOperators<ushort,ushort,ushort>, System.Numerics.IComparisonOperators<ushort,ushort,bool>, System.Numerics.IDecrementOperators<ushort>, System.Numerics.IDivisionOperators<ushort,ushort,ushort>, System.Numerics.IEqualityOperators<ushort,ushort,bool>, System.Numerics.IIncrementOperators<ushort>, System.Numerics.IMinMaxValue<ushort>, System.Numerics.IModulusOperators<ushort,ushort,ushort>, System.Numerics.IMultiplicativeIdentity<ushort,ushort>, System.Numerics.IMultiplyOperators<ushort,ushort,ushort>, System.Numerics.INumber<ushort>, System.Numerics.INumberBase<ushort>, System.Numerics.IShiftOperators<ushort,int,ushort>, System.Numerics.ISubtractionOperators<ushort,ushort,ushort>, System.Numerics.IUnaryNegationOperators<ushort,ushort>, System.Numerics.IUnaryPlusOperators<ushort,ushort>, System.Numerics.IUnsignedNumber<ushort>
[System.CLSCompliant(false)]
[System.Serializable]
public struct UInt16 : IComparable, IConvertible, IFormattable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct UInt16 : IComparable, IComparable<ushort>, IConvertible, IEquatable<ushort>, IFormattable
[System.CLSCompliant(false)]
public struct UInt16 : IComparable, IComparable<ushort>, IEquatable<ushort>, IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
interface IConvertible
interface IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
interface IConvertible
interface ISpanFormattable
interface IFormattable
[<System.CLSCompliant(false)>]
type uint16 = struct
interface IConvertible
interface IFormattable
interface IParsable<uint16>
interface ISpanFormattable
interface ISpanParsable<uint16>
interface IAdditionOperators<uint16, uint16, uint16>
interface IAdditiveIdentity<uint16, uint16>
interface IBinaryInteger<uint16>
interface IBinaryNumber<uint16>
interface IBitwiseOperators<uint16, uint16, uint16>
interface IComparisonOperators<uint16, uint16, bool>
interface IEqualityOperators<uint16, uint16, bool>
interface IDecrementOperators<uint16>
interface IDivisionOperators<uint16, uint16, uint16>
interface IIncrementOperators<uint16>
interface IModulusOperators<uint16, uint16, uint16>
interface IMultiplicativeIdentity<uint16, uint16>
interface IMultiplyOperators<uint16, uint16, uint16>
interface INumber<uint16>
interface INumberBase<uint16>
interface ISubtractionOperators<uint16, uint16, uint16>
interface IUnaryNegationOperators<uint16, uint16>
interface IUnaryPlusOperators<uint16, uint16>
interface IShiftOperators<uint16, int, uint16>
interface IMinMaxValue<uint16>
interface IUnsignedNumber<uint16>
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type uint16 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type uint16 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
type uint16 = struct
interface IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IConvertible, IEquatable(Of UShort), IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IConvertible, IEquatable(Of UShort), ISpanFormattable
Public Structure UInt16
Implements IAdditionOperators(Of UShort, UShort, UShort), IAdditiveIdentity(Of UShort, UShort), IBinaryInteger(Of UShort), IBinaryNumber(Of UShort), IBitwiseOperators(Of UShort, UShort, UShort), IComparable(Of UShort), IComparisonOperators(Of UShort, UShort, Boolean), IConvertible, IDecrementOperators(Of UShort), IDivisionOperators(Of UShort, UShort, UShort), IEqualityOperators(Of UShort, UShort, Boolean), IEquatable(Of UShort), IIncrementOperators(Of UShort), IMinMaxValue(Of UShort), IModulusOperators(Of UShort, UShort, UShort), IMultiplicativeIdentity(Of UShort, UShort), IMultiplyOperators(Of UShort, UShort, UShort), INumber(Of UShort), INumberBase(Of UShort), IParsable(Of UShort), IShiftOperators(Of UShort, Integer, UShort), ISpanParsable(Of UShort), ISubtractionOperators(Of UShort, UShort, UShort), IUnaryNegationOperators(Of UShort, UShort), IUnaryPlusOperators(Of UShort, UShort), IUnsignedNumber(Of UShort)
Public Structure UInt16
Implements IComparable, IConvertible, IFormattable
Public Structure UInt16
Implements IComparable, IComparable(Of UShort), IEquatable(Of UShort), IFormattable
- Devralma
- Öznitelikler
- Uygulamalar
-
IComparable IComparable<UInt16> IConvertible IEquatable<UInt16> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<UInt16> IParsable<TSelf> ISpanParsable<UInt16> ISpanParsable<TSelf> IAdditionOperators<UInt16,UInt16,UInt16> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<UInt16,UInt16> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<UInt16> IBinaryNumber<UInt16> IBinaryNumber<TSelf> IBitwiseOperators<UInt16,UInt16,UInt16> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<UInt16,UInt16,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<UInt16> IDecrementOperators<TSelf> IDivisionOperators<UInt16,UInt16,UInt16> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<UInt16,UInt16,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<UInt16> IIncrementOperators<TSelf> IMinMaxValue<UInt16> IModulusOperators<UInt16,UInt16,UInt16> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<UInt16,UInt16> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<UInt16,UInt16,UInt16> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<UInt16> INumber<TSelf> INumberBase<UInt16> INumberBase<TSelf> IShiftOperators<UInt16,Int32,UInt16> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<UInt16,UInt16,UInt16> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<UInt16,UInt16> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<UInt16,UInt16> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<UInt16>
Açıklamalar
Değer türü, UInt16 0 ile 65535 arasında değerler içeren işaretsiz tamsayıları temsil eder.
Önemli
Tür UInt16 CLS uyumlu değil. CLS uyumlu alternatif türü şeklindedir Int32. Int16 bunun yerine, sıfırdan değerine kadar olan bir UInt16 değeri değiştirmek için Int16.MaxValuekullanılabilir. CLS uyumluluğu hakkında daha fazla bilgi için bkz. Dil Bağımsızlığı ve Language-Independent Bileşenleri.
Yapısı UInt16 , bu türün örneklerini karşılaştırmak, örneğin değerini dize gösterimine dönüştürmek ve bir sayının dize gösterimini bu türün bir örneğine dönüştürmek için yöntemler sağlar.
Biçim belirtimi kodlarının değer türlerinin dize gösterimini nasıl denetlediğini öğrenmek için bkz . Biçimlendirme Türleri.
Alanlar
MaxValue |
mümkün olan en büyük değerini UInt16temsil eder. Bu alan sabittir. |
MinValue |
Mümkün olan en küçük değerini UInt16temsil eder. Bu alan sabittir. |
Yöntemler
Clamp(UInt16, UInt16, UInt16) |
Bir değeri kapsayıcı bir minimum ve maksimum değere kelepçeler. |
CompareTo(Object) |
Bu örneği belirtilen nesne ile karşılaştırır ve göreli değerlerin bir göstergesini döndürür. |
CompareTo(UInt16) |
Bu örneği belirtilen 16 bit işaretsiz tamsayıyla karşılaştırır ve göreli değerlerinin bir göstergesini döndürür. |
CreateChecked<TOther>(TOther) |
Geçerli türün bir örneğini bir değerden oluşturur ve geçerli türün temsil edilebilir aralığının dışında kalan değerler için taşma özel durumu oluşturur. |
CreateSaturating<TOther>(TOther) |
Geçerli türün bir örneğini bir değerden oluşturur ve geçerli türün temsil edilebilir aralığının dışında kalan tüm değerlerin doygunluğunu sağlar. |
CreateTruncating<TOther>(TOther) |
Geçerli türün bir örneğini bir değerden oluşturur ve geçerli türün temsil edilebilir aralığının dışında kalan değerleri keserek. |
DivRem(UInt16, UInt16) |
İki değerin bölümünü ve kalanını hesaplar. |
Equals(Object) |
Bu örneğin, belirtilen bir nesneye eşit olup olmadığını gösteren bir değeri döndürür. |
Equals(UInt16) |
Bu örneğin belirtilen UInt16 bir değere eşit olup olmadığını belirten bir değer döndürür. |
GetHashCode() |
Bu örneğe ilişkin karma kodu döndürür. |
GetTypeCode() | |
IsEvenInteger(UInt16) |
Bir değerin çift tam sayı olup olmadığını belirler. |
IsOddInteger(UInt16) |
Bir değerin tek bir tam sayı olup olmadığını belirler. |
IsPow2(UInt16) |
Bir değerin ikinin gücü olup olmadığını belirler. |
LeadingZeroCount(UInt16) |
Bir değerdeki baştaki sıfırların sayısını hesaplar. |
Log2(UInt16) |
Bir değerin log2'sini hesaplar. |
Max(UInt16, UInt16) |
İki değeri daha büyük olan işlemle karşılaştırır. |
Min(UInt16, UInt16) |
daha küçük olan iki değeri işlemle karşılaştırır. |
Parse(ReadOnlySpan<Char>, IFormatProvider) |
Bir karakter aralığını bir değere ayrıştırıyor. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Bir sayının belirtilen stil ve kültüre özgü biçimdeki span gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürür. |
Parse(String) |
Bir sayının dize gösterimini 16 bitlik işaretsiz tamsayı eşdeğerine dönüştürür. |
Parse(String, IFormatProvider) |
Belirtilen kültüre özgü biçimdeki bir sayının dize gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürür. |
Parse(String, NumberStyles) |
Belirtilen stildeki bir sayının dize gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürür. Bu yöntem CLS uyumlu değildir. CLS uyumlu alternatifi şeklindedir Parse(String, NumberStyles). |
Parse(String, NumberStyles, IFormatProvider) |
Belirtilen stilde ve kültüre özgü biçimdeki bir sayının dize gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürür. |
PopCount(UInt16) |
Bir değerde ayarlanan bit sayısını hesaplar. |
RotateLeft(UInt16, Int32) |
Değeri belirli bir miktar sola döndürür. |
RotateRight(UInt16, Int32) |
Değeri belirli bir miktar sağa döndürür. |
Sign(UInt16) |
Bir değerin işaretini hesaplar. |
ToString() |
Bu örneğin sayısal değerini eşdeğer dize gösterimine dönüştürür. |
ToString(IFormatProvider) |
Bu örneğin sayısal değerini belirtilen kültüre özgü biçim bilgilerini kullanarak eşdeğer dize gösterimine dönüştürür. |
ToString(String) |
Belirtilen biçimi kullanarak bu örneğin sayısal değerini eşdeğer dize gösterimine dönüştürür. |
ToString(String, IFormatProvider) |
Bu örneğin sayısal değerini belirtilen biçim ve kültüre özgü biçim bilgilerini kullanarak eşdeğer dize gösterimine dönüştürür. |
TrailingZeroCount(UInt16) |
Bir değerdeki sondaki sıfırların sayısını hesaplar. |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Geçerli işaretsiz kısa sayı örneğinin değerini sağlanan karakter aralığına biçimlendirmeye çalışır. |
TryParse(ReadOnlySpan<Char>, IFormatProvider, UInt16) |
Bir karakter aralığını bir değere ayrıştırmaya çalışır. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt16) |
Bir sayının belirtilen stildeki ve kültüre özgü biçimdeki span gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürmeyi dener. Dönüştürmenin başarılı veya başarısız olduğunu gösteren dönüş değeri. |
TryParse(ReadOnlySpan<Char>, UInt16) |
Bir sayının span gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürmeyi dener. Dönüştürmenin başarılı veya başarısız olduğunu gösteren dönüş değeri. |
TryParse(String, IFormatProvider, UInt16) |
Bir dizeyi bir değere ayrıştırmaya çalışır. |
TryParse(String, NumberStyles, IFormatProvider, UInt16) |
Belirtilen stilde ve kültüre özgü biçimdeki bir sayının dize gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürmeyi dener. Dönüştürmenin başarılı veya başarısız olduğunu gösteren dönüş değeri. |
TryParse(String, UInt16) |
Bir sayının dize gösterimini 16 bit işaretsiz tamsayı eşdeğerine dönüştürmeyi dener. Dönüştürmenin başarılı veya başarısız olduğunu gösteren dönüş değeri. |
Belirtik Arabirim Kullanımları
Şunlara uygulanır
İş Parçacığı Güvenliği
Bu türün tüm üyeleri iş parçacığı güvenlidir. Örneğin durumunu değiştirmek için görüntülenen üyeler, gerçekte yeni değer ile başlatılan yeni bir örneği döndürür. Diğer türlerde olduğu gibi, bu türün örneğini içeren paylaşılan değişkenini okuma ve yazma, iş parçacığı güvenliğini sağlamak için bir kilit tarafından korunmalıdır.