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.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.