public override Type GetGenericTypeDefinition() { if (!IsGenericType) { throw new InvalidOperationException(SR.InvalidOperation_NotGenericType); } return(RuntimeTypeHandle.GetGenericTypeDefinition(this)); }
internal static RuntimeType GetGenericTypeDefinition(RuntimeType type) { RuntimeType o = type; if (RuntimeTypeHandle.HasInstantiation(o) && !RuntimeTypeHandle.IsGenericTypeDefinition(o)) { RuntimeTypeHandle.GetGenericTypeDefinition(o.GetTypeHandleInternal(), JitHelpers.GetObjectHandleOnStack <RuntimeType>(ref o)); } return(o); }