13 references to CastHelpers
System.Private.CoreLib (13)
src\System\Array.CoreCLR.cs (5)
256CastHelpers.Unbox_Nullable(ref dest, pDestMT, obj); 310Unsafe.Add(ref destData, i) = CastHelpers.ChkCastAny(destTH, obj); 540&& CastHelpers.IsInstanceOfAny(pElementMethodTable, value) == null) 550if (CastHelpers.IsInstanceOfAny(pElementMethodTable, value) != null) 554CastHelpers.Unbox_Nullable(ref offsetDataRef, pElementMethodTable, value);
src\System\Runtime\CompilerServices\CastHelpers.cs (3)
576CastHelpers.ThrowInvalidCastException(obj, typeMT); 656CastHelpers.ThrowInvalidCastException(obj, pMT1); 673CastHelpers.ThrowInvalidCastException(pMT1, pMT2);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
1141return CastCache.TryGet(CastHelpers.s_table!, (nuint)srcTH.m_asTAddr, (nuint)destTH.m_asTAddr); 1149&& CastHelpers.IsNullableForType(destTH.AsMethodTable(), srcTH.AsMethodTable()))
src\System\RuntimeHandles.cs (2)
1169return CastHelpers.ReboxFromNullable(pMT, src); 1182CastHelpers.Unbox_Nullable(
src\System\RuntimeType.CoreCLR.cs (1)
3313bool ret = CastHelpers.IsInstanceOfAny(GetUnderlyingNativeHandle().ToPointer(), o) is not null;