Convert.ToUInt32 Method (Object, IFormatProvider)
Converts the value of the specified object to a 32-bit unsigned integer, using the specified culture-specific formatting information.
This API is not CLS-compliant. Namespace: System
Assembly: mscorlib (in mscorlib.dll)
[<CLSCompliantAttribute(false)>] static member ToUInt32 : value:Object * provider:IFormatProvider -> uint32
- Type: System.IFormatProvider
An object that supplies culture-specific formatting information.
Return ValueType: System.UInt32
A 32-bit unsigned integer that is equivalent to value, or zero if value is a null reference (Nothing in Visual Basic).
The return value is the result of invoking the IConvertible.ToUInt32 method of the underlying type of value.
provider enables the user to specify culture-specific conversion information about the contents of value. For example, if value is a String that represents a number, provider could supply culture-specific information about the notation used to represent that number.
The base types ignore provider; however, the parameter may be used if value is a user-defined type that implements the IConvertible interface.
The following example defines a HexString class that implements the IConvertible interface and that is designed to hold the string representation of both 32-bit signed and 32-bit unsigned values. The class includes a Sign property that indicates the sign of its hexadecimal value.
The following example shows that a call to the method that passes a HexString object as a parameter, in turn, calls the IConvertible.ToUInt32 implementation of the HexString class.
.NET FrameworkSupported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
XNA FrameworkSupported in: 3.0, 2.0, 1.0
Portable Class LibrarySupported in: Portable Class Library
Supported in: Windows Phone 8.1
Supported in: Windows Phone Silverlight 8.1
Supported in: Windows Phone Silverlight 8