Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

struct System.​RuntimeTypeHandle

Assembly: System.Runtime

Implemented Interfaces

Represents a type using an internal metadata token.

Properties

public nint
Value
Gets a handle to the type represented by this instance.

Methods

public bool
Equals​(object obj)
Indicates whether the specified object is equal to the current <see cref="T:System.RuntimeTypeHandle" /> structure.
Returns <see langword="true" /> if <paramref name="obj" /> is a <see cref="T:System.RuntimeTypeHandle" /> structure and is equal to the value of this instance; otherwise, <see langword="false" /> .
obj An object to compare to the current instance.
public bool
Equals​(RuntimeTypeHandle handle)
Indicates whether the specified <see cref="T:System.RuntimeTypeHandle" /> structure is equal to the current <see cref="T:System.RuntimeTypeHandle" /> structure.
Returns <see langword="true" /> if the value of <paramref name="handle" /> is equal to the value of this instance; otherwise, <see langword="false" /> .
handle The <see cref="T:System.RuntimeTypeHandle" /> structure to compare to the current instance.
public static RuntimeTypeHandle
FromIntPtr​(nint value)
Returns a new <see cref="T:System.RuntimeTypeHandle" /> object created from a handle to a RuntimeType.
Returns A new <see cref="T:System.RuntimeTypeHandle" /> object that corresponds to the value parameter.
value An IntPtr handle to a RuntimeType to create a <see cref="T:System.RuntimeTypeHandle" /> object from.
public int
GetHashCode​()
Returns the hash code for the current instance.
Returns A 32-bit signed integer hash code.
public ModuleHandle
GetModuleHandle​()
Gets a handle to the module that contains the type represented by the current instance.
Returns A <see cref="T:System.ModuleHandle" /> structure representing a handle to the module that contains the type represented by the current instance.
public void
GetObjectData​(SerializationInfo info, StreamingContext context)
Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data necessary to deserialize the type represented by the current instance.
info The object to be populated with serialization information.
context (Reserved) The location where serialized data will be stored and retrieved.
public static nint
ToIntPtr​(RuntimeTypeHandle value)
Returns the internal pointer representation of a <see cref="T:System.RuntimeTypeHandle" /> object.
Returns An <see cref="T:System.IntPtr" /> object that represents a <see cref="T:System.RuntimeTypeHandle" /> object.
value A <see cref="T:System.RuntimeTypeHandle" /> object to retrieve an internal pointer representation from.
public string
ToString​()
Inherited from ValueType
Returns the fully qualified type name of this instance.
Returns The fully qualified type name.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .