Export (0) Print
Expand All

UIntPtr to UInt32 Conversion

.NET Framework 1.1

Converts the value of the specified UIntPtr to a 32-bit unsigned integer.

The UIntPtr type is not CLS-compliant. The CLS-compliant alternative type is IntPtr. For more information about CLS compliance, see What is the Common Language Specification.

[Visual Basic]
returnValue = UIntPtr.op_Explicit(value)
[C#]
public static explicit operator uint(
 UIntPtr value
);
[C++]
public: static unsigned int op_Explicit();
[JScript]
returnValue = UInt32(value);

[Visual Basic] In Visual Basic, you can use the conversion operators defined by a type, but you cannot define your own.

[JScript] In JScript, you can use the conversion operators defined by a type, but you cannot define your own.

Arguments [Visual Basic, JScript]

value
A UIntPtr.

Parameters [C#]

value
A UIntPtr.

Return Value

The contents of value.

Exceptions

Exception Type Condition
OverflowException On a 64-bit platform, the value of value is too large to represent as a 32-bit unsigned integer.

Remarks

An exception is only thrown if the value of value requires more bits than the current platform supports.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

UIntPtr Structure | UIntPtr Members | System Namespace | ToUInt32

Show:
© 2014 Microsoft