4 instantiations of TypeHandle
System.Private.CoreLib (4)
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
894return new(ElementType); 1096return new TypeHandle((void*)RuntimeTypeHandle.ToIntPtr(typeof(T).TypeHandle));
src\System\RuntimeType.CoreCLR.cs (1)
2421return new TypeHandle((void*)m_handle);
src\System\TypedReference.CoreCLR.cs (1)
44TypeHandle typeHandle = new((void*)value._type);
52 references to TypeHandle
System.Private.CoreLib (52)
src\System\Array.CoreCLR.cs (9)
158TypeHandle srcTH = RuntimeHelpers.GetMethodTable(sourceArray)->GetArrayElementTypeHandle(); 159TypeHandle destTH = RuntimeHelpers.GetMethodTable(destinationArray)->GetArrayElementTypeHandle(); 161if (TypeHandle.AreSameType(srcTH, destTH)) // This check kicks for different array kind or dimensions 235TypeHandle destTH = pDestArrayMT->GetArrayElementTypeHandle(); 277TypeHandle srcTH = pSrcArrayMT->GetArrayElementTypeHandle(); 459TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 501TypeHandle arrayElementTypeHandle = pMethodTable->GetArrayElementTypeHandle(); 539if (pElementMethodTable != TypeHandle.TypeHandleOf<object>().AsMethodTable() // Everything is compatible with Object 672TypeHandle thElem = pArrayMT->GetArrayElementTypeHandle();
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (15)
37TypeHandle elementTH = pMT->GetArrayElementTypeHandle(); 101TypeHandle th = targetTypeHandle.GetRuntimeType().GetNativeTypeHandle(); 886/// Gets a <see cref="TypeHandle"/> for the element type of the current type. 890public TypeHandle GetArrayElementTypeHandle() 1072/// Gets whether or not this <see cref="TypeHandle"/> wraps a <c>TypeDesc</c> pointer. 1094public static TypeHandle TypeHandleOf<T>() 1099public static bool AreSameType(TypeHandle left, TypeHandle right) => left.m_asTAddr == right.m_asTAddr; 1104public bool CanCastTo(TypeHandle destTH) 1118public static bool CanCastToForReflection(TypeHandle srcTH, TypeHandle destTH) 1132private static CastResult TryCanCastTo(TypeHandle srcTH, TypeHandle destTH) 1145private static bool CanCastToWorker(TypeHandle srcTH, TypeHandle destTH, bool nullableCast)
src\System\RuntimeHandles.cs (7)
444TypeHandle typeHandle = type.GetNativeTypeHandle(); 524TypeHandle typeHandle = type.GetNativeTypeHandle(); 545TypeHandle typeHandle = type.GetNativeTypeHandle(); 648TypeHandle th = type.GetNativeTypeHandle(); 664bool ret = TypeHandle.CanCastToForReflection(type.GetNativeTypeHandle(), target.GetNativeTypeHandle()); 679TypeHandle typeHandle = type.GetNativeTypeHandle(); 1633TypeHandle th = declaringType.GetNativeTypeHandle();
src\System\RuntimeType.BoxCache.cs (1)
40TypeHandle handle = rt.GetNativeTypeHandle();
src\System\RuntimeType.CoreCLR.cs (17)
1773TypeHandle typeHandle = GetNativeTypeHandle(); 2419internal unsafe TypeHandle GetNativeTypeHandle() 3379TypeHandle th = GetNativeTypeHandle(); 3420TypeHandle th = GetNativeTypeHandle(); 3436TypeHandle th = GetNativeTypeHandle(); 3448TypeHandle th = GetNativeTypeHandle(); 3454bool isEnum = th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3466TypeHandle th = GetNativeTypeHandle(); 3468bool isEnum = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<Enum>().AsMethodTable(); 3478TypeHandle th = GetNativeTypeHandle(); 3490TypeHandle th = GetNativeTypeHandle(); 3500TypeHandle th = GetNativeTypeHandle(); 3502bool isDelegate = !th.IsTypeDesc && th.AsMethodTable()->ParentMethodTable == Runtime.CompilerServices.TypeHandle.TypeHandleOf<MulticastDelegate>().AsMethodTable(); 3511TypeHandle th = GetNativeTypeHandle(); 3523TypeHandle th = GetNativeTypeHandle(); 3535TypeHandle th = GetNativeTypeHandle(); 3688TypeHandle th = GetNativeTypeHandle();
src\System\StubHelpers.cs (1)
586internal TypeHandle m_Array;
src\System\TypedReference.CoreCLR.cs (2)
44TypeHandle typeHandle = new((void*)value._type); 56? TypeHandle.TypeHandleOf<UIntPtr>().AsMethodTable()