The properties of the GCHandle structure are listed below. For a complete list of GCHandle structure members, see the GCHandle Members topic.
IsAllocated | This method can be used to determine if the handle is still allocated. This method is particularly useful when using weak handles GCHandleType- Weak) since it provides a way of determining if the GC handle is still available. When the GC attempts to collect the object, the latter could still be resurrected in the finalizer. In this case, the handle will not be allocated (this is lost when the GC attempts to collect the object) although the Target object is valid. |
Target | Allows getting/ setting the Object this handle represents. |
GCHandle Structure | System.Runtime.InteropServices Namespace