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.
Assembly: mscorlib (in mscorlib.dll)
[CLSCompliantAttribute(false)] public: static unsigned int ToUInt32( Object^ value, IFormatProvider^ provider )
- 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 nullptr.
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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.