UInt32 结构
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
此 API 不符合 CLS。
表示 32 位无符号整数。
public value class System::UInt32 : IComparable, IComparable<System::UInt32>, IConvertible, IEquatable<System::UInt32>, IFormattable
public value class System::UInt32 : IComparable, IComparable<System::UInt32>, IConvertible, IEquatable<System::UInt32>, ISpanFormattable
public value class System::UInt32 : IComparable, IConvertible, IFormattable
public value class System::UInt32 : IComparable, IComparable<System::UInt32>, IEquatable<System::UInt32>, IFormattable
[System.CLSCompliant(false)]
public struct UInt32 : IComparable, IComparable<uint>, IConvertible, IEquatable<uint>, IFormattable
[System.CLSCompliant(false)]
public struct UInt32 : IComparable, IComparable<uint>, IConvertible, IEquatable<uint>, ISpanFormattable
[System.CLSCompliant(false)]
[System.Serializable]
public struct UInt32 : IComparable, IConvertible, IFormattable
[System.CLSCompliant(false)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct UInt32 : IComparable, IComparable<uint>, IConvertible, IEquatable<uint>, IFormattable
[System.CLSCompliant(false)]
public struct UInt32 : IComparable, IComparable<uint>, IEquatable<uint>, IFormattable
[<System.CLSCompliant(false)>]
type uint32 = struct
interface IConvertible
interface IFormattable
[<System.CLSCompliant(false)>]
type uint32 = struct
interface IConvertible
interface ISpanFormattable
interface IFormattable
[<System.CLSCompliant(false)>]
[<System.Serializable>]
type uint32 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type uint32 = struct
interface IFormattable
interface IConvertible
[<System.CLSCompliant(false)>]
type uint32 = struct
interface IFormattable
Public Structure UInt32
Implements IComparable, IComparable(Of UInteger), IConvertible, IEquatable(Of UInteger), IFormattable
Public Structure UInt32
Implements IComparable, IComparable(Of UInteger), IConvertible, IEquatable(Of UInteger), ISpanFormattable
Public Structure UInt32
Implements IComparable, IConvertible, IFormattable
Public Structure UInt32
Implements IComparable, IComparable(Of UInteger), IEquatable(Of UInteger), IFormattable
- 继承
- 属性
- 实现
注解
值 UInt32
类型表示值范围为 0 到 4,294,967,295 的无符号整数。
重要
UInt32类型不符合 CLS。 符合 CLS 的替代类型为 Int64 。 Int32 可以改为用于替换范围 UInt32 从零到 的值 MaxValue 。 有关 CLS 符合性详细信息,请参阅 语言独立性和Language-Independent组件。
UInt32
提供用于比较此类型的实例的方法,将实例的值转换为其表示形式,并将数字的表示形式转换为 String String 此类型的实例。
有关格式规范代码如何控制 String 值类型的表示形式的信息,请参阅 格式设置类型。
字段
MaxValue |
表示 UInt32 的最大可能值。 此字段为常数。 |
MinValue |
表示 UInt32 的最小可能值。 此字段为常数。 |
方法
CompareTo(Object) |
将此实例与指定对象进行比较并返回一个对二者的相对值的指示。 |
CompareTo(UInt32) |
将此实例与指定的 32 位无符号整数进行比较并返回对其相对值的指示。 |
Equals(Object) |
返回一个值,该值指示此实例是否等于指定的对象。 |
Equals(UInt32) |
返回一个值,该值指示此实例是否与指定的 UInt32 相等。 |
GetHashCode() |
返回此实例的哈希代码。 |
GetTypeCode() | |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
将指定样式和区域性特定格式的数字的范围表示形式转换为其等效的 32 位无符号整数。 |
Parse(String) |
将数字的字符串表示形式转换为它的等效 32 位无符号整数。 |
Parse(String, IFormatProvider) |
将指定区域性特定格式的数字的字符串表示形式转换为它的等效 32 位无符号整数。 |
Parse(String, NumberStyles) |
将指定样式的数字的字符串表示形式转换为它的等效 32 位无符号整数。 |
Parse(String, NumberStyles, IFormatProvider) |
将指定样式和区域性特定格式的数字的字符串表示形式转换为它的等效 32 位无符号整数。 |
ToString() |
将此实例的数值转换为其等效的字符串表示形式。 |
ToString(IFormatProvider) |
使用指定的区域性特定格式信息,将此实例的数值转换为它的等效字符串表示形式。 |
ToString(String) |
使用指定的格式将此实例的数值转换为它的等效字符串表示形式。 |
ToString(String, IFormatProvider) |
使用指定的格式和区域性特定格式信息,将此实例的数值转换为它的等效字符串表示形式。 |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
尝试将当前无符号整数数字实例的值的格式设置为提供的字符范围。 |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, UInt32) |
尝试将指定样式和区域性特定格式的数字的范围表示形式转换为其等效的 32 位无符号整数。 一个指示转换是否成功的返回值。 |
TryParse(ReadOnlySpan<Char>, UInt32) |
尝试将数字的范围表示形式转换为其等效的 32 位无符号整数。 一个指示转换是否成功的返回值。 |
TryParse(String, NumberStyles, IFormatProvider, UInt32) |
尝试将数字的指定样式和区域性特定格式的字符串表示形式转换为其等效的 32 位无符号整数。 一个指示转换是否成功的返回值。 |
TryParse(String, UInt32) |
尝试将数字的字符串表示形式转换为等效的 32 位无符号整数。 一个指示转换是否成功的返回值。 |
显式接口实现
适用于
线程安全性
此类型的所有成员都是线程安全的。 似乎要修改实例状态的成员实际上返回用新值初始化的新实例。 与任何其他类型一样,读取和写入包含此类型的实例的共享变量必须受锁保护,以确保线程安全。