GetGenericTypeDefinition() 개인적인 메소드

private GetGenericTypeDefinition ( ) : RuntimeTypeHandle
리턴 RuntimeTypeHandle
예제 #1
0
        public override Type GetGenericTypeDefinition()
        {
            if (!IsGenericType)
            {
                throw new InvalidOperationException(SR.InvalidOperation_NotGenericType);
            }

            return(RuntimeTypeHandle.GetGenericTypeDefinition(this));
        }
예제 #2
0
        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);
        }