[CLSCompliant(false)] |
UInt32 provides methods to compare instances of this type, convert the value of an instance to its String representation, and convert the String representation of a number to an instance of this type.
For information about how format specification codes control the String representation of value types, see the conceptual topic at MSDN: formattingoverview.
This type implements interfaces IComparable, IFormattable, and IConvertible. Use the Convert class for conversions instead of this type's explicit interface member implementation of IConvertible.
MaxValue | Represents the largest possible value of UInt32. This field is constant. |
MinValue | Represents the smallest possible value of UInt32. This field is constant. |
CompareTo | Compares this instance to a specified object and returns an indication of their relative values. |
Equals | Overridden: Returns a value indicating whether this instance is equal to a specified object. |
GetHashCode | Overridden: Returns the hash code for this instance. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
GetTypeCode | Returns the TypeCode for value type UInt32. |
Parse | Overloaded:Parse(string s) Converts the string representation of a number to its 32-bit unsigned integer equivalent. |
Parse | Overloaded:Parse(string s, IFormatProvider provider) Converts the string representation of a number in a specified culture-specific format to its 32-bit unsigned integer equivalent. |
Parse | Overloaded:Parse(string s, NumberStyles style) Converts the string representation of a number in a specified style to its 32-bit unsigned integer equivalent. |
Parse | Overloaded:Parse(string s, NumberStyles style, IFormatProvider provider) Converts the string representation of a number in a specified style and culture-specific format to its 32-bit unsigned integer equivalent. |
ToString | Overloaded:ToString() Overridden: Converts the numeric value of this instance to its equivalent string representation. |
ToString | Overloaded:ToString(IFormatProvider provider) Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
ToString | Overloaded:ToString(string format) Converts the numeric value of this instance to its equivalent string representation using the specified format. |
ToString | Overloaded:ToString(string format, IFormatProvider provider) Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public const uint MaxValue;
|
public const uint MinValue;
|
value
Return Value | Description |
---|---|
Less than zero | This instance is less than . |
Zero | This instance is equal to . |
Greater than zero | This instance is greater than value. -or- value is null. |
Exception Type | Condition |
---|---|
ArgumentException | value is not a UInt32. |
The value parameter must be null or an instance of UInt32; otherwise, an exception is thrown.
obj
UInt32 myVariable1 = 20; UInt32 myVariable2 = 20; // Display the declaring type. Console.WriteLine("\nType of 'myVariable1' is '{0}' and"+ " value is :{1}",myVariable1.GetType(), myVariable1); Console.WriteLine("Type of 'myVariable2' is '{0}' and"+ " value is :{1}",myVariable2.GetType(), myVariable2); // Compare 'myVariable1' instance with 'myVariable2' Object. if( myVariable1.Equals( myVariable2 ) ) Console.WriteLine( "\nStructures 'myVariable1' and "+ "'myVariable2' are equal"); else Console.WriteLine( "\nStructures 'myVariable1' and "+ "'myVariable2' are not equal");
~UInt32(); |
public override int GetHashCode(); |
public Type GetType(); |
public TypeCode GetTypeCode(); |
protected object MemberwiseClone(); |
s
Exception Type | Condition |
---|---|
ArgumentNullException | The s parameter is null. |
FormatException | The s parameter is not of the correct format. |
OverflowException | The s parameter represents a number less than UInt32.MinValue or greater than UInt32.MaxValue. |
[ws][sign]digits[ws]
Items in square brackets ('[' and ']') are optional, and other items are as follows.
The s parameter is parsed using the formatting information in a NumberFormatInfo initialized for the current system culture. For more information, see NumberFormatInfo.CurrentInfo.
[CLSCompliant(false)] |
s
provider
Exception Type | Condition |
---|---|
ArgumentNullException | s is null. |
FormatException | s is not in the correct style. |
OverflowException | s represents a number less than UInt32.MinValue or greater than UInt32.MaxValue. |
[ws][sign]digits[ws]
Items in square brackets ('[' and ']') are optional, and other items are as follows.
The provider parameter is an IFormatProvider that obtains a NumberFormatInfo. The NumberFormatInfo provides culture-specific information about the format of s. If provider is null, the NumberFormatInfo for the current culture is used.
[CLSCompliant(false)] |
s
style
Exception Type | Condition |
---|---|
ArgumentNullException | s is null. |
ArgumentException | style is not a valid combination of bit flags from the NumberStyles enumeration. |
FormatException | s is not in a format compliant with style. |
OverflowException | s represents a number less than UInt32.MinValue or greater than UInt32.MaxValue. |
[ws][sign]digits[ws]
Items in square brackets ('[' and ']') are optional, and other items are as follows.
The style parameter can be one or more NumberStyles enumerated constants combined using a bitwise OR operation (except NumberStyles.Any and NumberStyles.AllowDecimalPoint, which are invalid for the type returned by this method).
[CLSCompliant(false)] |
s
style
provider
Exception Type | Condition |
---|---|
ArgumentNullException | s is null. |
ArgumentException | style is not a valid combination of NumberStyles enumerated constants. |
FormatException | s is not in a format compliant with style. |
OverflowException | s represents a number less than UInt32.MinValue or greater than UInt32.MaxValue. |
[ws][sign]digits[ws]
Items in square brackets ('[' and ']') are optional, and other items are as follows.
The style parameter can be one or more NumberStyles enumerated constants combined using a bitwise OR operation (except NumberStyles.Any and NumberStyles.AllowDecimalPoint, which are invalid for the type returned by this method).
The provider parameter is an IFormatProvider that obtains a NumberFormatInfo. The NumberFormatInfo provides culture-specific information about the format of s. If provider is null, the NumberFormatInfo for the current culture is used.
public override string ToString(); |
public string ToString( |
provider
The provider parameter is an IFormatProvider that obtains a NumberFormatInfo. The NumberFormatInfo provides culture-specific format information about this instance. If provider is null, this instance is formatted with the NumberFormatInfo for the current culture.
format
Exception Type | Condition |
---|---|
FormatException | The format parameter is invalid. |
The return value of this instance is formatted with the NumberFormatInfo for the current culture.
public string ToString( |
format
provider
Exception Type | Condition |
---|---|
FormatException | The format parameter is invalid. |
The provider parameter is an IFormatProvider that obtains a NumberFormatInfo. The NumberFormatInfo provides culture-specific format information about this instance. If provider is null, the return value for this instance is formatted with the NumberFormatInfo for the current culture.