Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetBaseType()

RuntimeType System.RuntimeType.GetBaseType ( )
inlineprivate

Definition at line 3998 of file RuntimeType.cs.

3999 {
4000 if (base.IsInterface)
4001 {
4002 return null;
4003 }
4004 if (RuntimeTypeHandle.IsGenericVariable(this))
4005 {
4008 for (int i = 0; i < genericParameterConstraints.Length; i++)
4009 {
4011 if (runtimeType2.IsInterface)
4012 {
4013 continue;
4014 }
4015 if (runtimeType2.IsGenericParameter)
4016 {
4017 GenericParameterAttributes genericParameterAttributes = runtimeType2.GenericParameterAttributes & GenericParameterAttributes.SpecialConstraintMask;
4018 if ((genericParameterAttributes & GenericParameterAttributes.ReferenceTypeConstraint) == 0 && (genericParameterAttributes & GenericParameterAttributes.NotNullableValueTypeConstraint) == 0)
4019 {
4020 continue;
4021 }
4022 }
4024 }
4025 if (runtimeType == ObjectType)
4026 {
4028 if ((genericParameterAttributes2 & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)
4029 {
4031 }
4032 }
4033 return runtimeType;
4034 }
4035 return RuntimeTypeHandle.GetBaseType(this);
4036 }
override Type[] GetGenericParameterConstraints()
static readonly RuntimeType ObjectType
static readonly RuntimeType ValueType

References System.RuntimeTypeHandle.GetBaseType(), and System.RuntimeTypeHandle.IsGenericVariable().

Referenced by System.RuntimeType.IsDelegate(), and System.RuntimeType.IsSubclassOf().