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

◆ IsSubclassOf()

override bool System.RuntimeType.IsSubclassOf ( Type type)
inlinevirtual

Reimplemented from System.Type.

Definition at line 2816 of file RuntimeType.cs.

2817 {
2818 if ((object)type == null)
2819 {
2820 throw new ArgumentNullException("type");
2821 }
2823 if (runtimeType == null)
2824 {
2825 return false;
2826 }
2828 while (baseType != null)
2829 {
2830 if (baseType == runtimeType)
2831 {
2832 return true;
2833 }
2834 baseType = baseType.GetBaseType();
2835 }
2836 if (runtimeType == ObjectType && runtimeType != this)
2837 {
2838 return true;
2839 }
2840 return false;
2841 }
RuntimeType GetBaseType()
static readonly RuntimeType ObjectType

References System.RuntimeType.RuntimeType(), System.RuntimeType.GetBaseType(), System.RuntimeType.ObjectType, and System.type.

Referenced by System.TypedReference.MakeTypedReference().