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

◆ IsAssignableFrom() [1/4]

override bool System.RuntimeType.IsAssignableFrom ( [NotNullWhen(true)] Type c)
inline

Definition at line 3652 of file RuntimeType.cs.

3653 {
3654 if ((object)c == null)
3655 {
3656 return false;
3657 }
3658 if ((object)c == this)
3659 {
3660 return true;
3661 }
3662 if (c.UnderlyingSystemType is RuntimeType type)
3663 {
3664 return RuntimeTypeHandle.CanCastTo(type, this);
3665 }
3666 if (c is TypeBuilder)
3667 {
3668 if (c.IsSubclassOf(this))
3669 {
3670 return true;
3671 }
3672 if (base.IsInterface)
3673 {
3674 return c.ImplementInterface(this);
3675 }
3677 {
3679 for (int i = 0; i < genericParameterConstraints.Length; i++)
3680 {
3682 {
3683 return false;
3684 }
3685 }
3686 return true;
3687 }
3688 }
3689 return false;
3690 }
override Type[] GetGenericParameterConstraints()
override bool IsAssignableFrom([NotNullWhen(true)] TypeInfo typeInfo)
override bool IsGenericParameter

References System.RuntimeTypeHandle.CanCastTo(), System.Type.ImplementInterface(), System.Type.IsSubclassOf(), System.type, and System.Type.UnderlyingSystemType.