13 [__DynamicallyInvokable]
17 private unsafe
void* m_value;
24 [__DynamicallyInvokable]
25 public static int Size 28 [__DynamicallyInvokable]
37 [SecuritySafeCritical]
39 [__DynamicallyInvokable]
42 m_value = (
void*)value;
48 [SecuritySafeCritical]
50 [__DynamicallyInvokable]
53 m_value = (
void*)value;
69 ulong uInt = info.GetUInt64(
"value");
70 if (
Size == 4 && uInt > uint.MaxValue)
74 m_value = (
void*)uInt;
89 info.AddValue(
"value", (ulong)m_value);
96 [SecuritySafeCritical]
97 [__DynamicallyInvokable]
98 public unsafe
override bool Equals(
object obj)
102 return m_value == ((
UIntPtr)obj).m_value;
109 [SecuritySafeCritical]
110 [__DynamicallyInvokable]
113 return (
int)m_value &
int.MaxValue;
119 [SecuritySafeCritical]
121 [__DynamicallyInvokable]
124 return checked((uint)m_value);
129 [SecuritySafeCritical]
131 [__DynamicallyInvokable]
134 return (ulong)m_value;
139 [SecuritySafeCritical]
140 [__DynamicallyInvokable]
150 public static explicit operator UIntPtr(uint value)
160 public static explicit operator UIntPtr(ulong value)
169 [SecuritySafeCritical]
171 public unsafe
static explicit operator uint(
UIntPtr value)
173 return checked((uint)value.m_value);
179 [SecuritySafeCritical]
181 public unsafe
static explicit operator ulong(
UIntPtr value)
183 return (ulong)value.m_value;
190 [CLSCompliant(
false)]
192 public unsafe
static explicit operator UIntPtr(
void* value)
201 [CLSCompliant(
false)]
203 public unsafe
static explicit operator void*(
UIntPtr value)
205 return value.m_value;
213 [SecuritySafeCritical]
215 [__DynamicallyInvokable]
218 return value1.m_value == value2.m_value;
226 [SecuritySafeCritical]
228 [__DynamicallyInvokable]
231 return value1.m_value != value2.m_value;
241 return pointer + offset;
261 return pointer - offset;
276 [SecuritySafeCritical]
277 [CLSCompliant(
false)]
A platform-specific type that is used to represent a pointer or a handle.
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
unsafe UIntPtr(void *value)
Initializes a new instance of T:System.UIntPtr using the specified pointer to an unspecified type.
unsafe uint ToUInt32()
Converts the value of this instance to a 32-bit unsigned integer.
unsafe UIntPtr(uint value)
Initializes a new instance of the T:System.UIntPtr structure using the specified 32-bit pointer or ha...
Describes the source and destination of a given serialized stream, and provides an additional caller-...
unsafe UIntPtr(ulong value)
Initializes a new instance of T:System.UIntPtr using the specified 64-bit pointer or handle.
static UIntPtr operator+(UIntPtr pointer, int offset)
Adds an offset to the value of an unsigned pointer.
Provides information about, and means to manipulate, the current environment and platform....
unsafe override bool Equals(object obj)
Returns a value indicating whether this instance is equal to a specified object.
unsafe override string ToString()
Converts the numeric value of this instance to its equivalent string representation.
static int Size
Gets the size of this instance.
static UIntPtr Add(UIntPtr pointer, int offset)
Adds an offset to the value of an unsigned pointer.
unsafe override int GetHashCode()
Returns the hash code for this instance.
static unsafe bool operator !=(UIntPtr value1, UIntPtr value2)
Determines whether two specified instances of T:System.UIntPtr are not equal.
Stores all the data needed to serialize or deserialize an object. This class cannot be inherited.
static UIntPtr Subtract(UIntPtr pointer, int offset)
Subtracts an offset from the value of an unsigned pointer.
static unsafe bool operator==(UIntPtr value1, UIntPtr value2)
Determines whether two specified instances of T:System.UIntPtr are equal.
The exception that is thrown when one of the arguments provided to a method is not valid.
Allows an object to control its own serialization and deserialization.
unsafe void * ToPointer()
Converts the value of this instance to a pointer to an unspecified type.
static UIntPtr operator -(UIntPtr pointer, int offset)
Subtracts an offset from the value of an unsigned pointer.
Specifies that the class can be serialized.
Provides information about a specific culture (called a locale for unmanaged code development)....
static readonly UIntPtr Zero
A read-only field that represents a pointer or handle that has been initialized to zero.
void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a T:System.Runtime.Serialization.SerializationInfo with the data needed to serialize the ta...
unsafe ulong ToUInt64()
Converts the value of this instance to a 64-bit unsigned integer.