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

◆ CheckConsistency()

void System.Reflection.RtFieldInfo.CheckConsistency ( object target)
inlinepackage

Definition at line 87 of file RtFieldInfo.cs.

88 {
89 if ((m_fieldAttributes & FieldAttributes.Static) != FieldAttributes.Static && !m_declaringType.IsInstanceOfType(target))
90 {
91 if (target == null)
92 {
93 throw new TargetException(SR.RFLCT_Targ_StatFldReqTarg);
94 }
95 throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, Name, m_declaringType, target.GetType()));
96 }
97 }
FieldAttributes m_fieldAttributes
override bool IsInstanceOfType([NotNullWhen(true)] object o)

References System.SR.Arg_FieldDeclTarget, System.SR.Format(), System.RuntimeType.IsInstanceOfType(), System.Reflection.RuntimeFieldInfo.m_declaringType, System.Reflection.RtFieldInfo.m_fieldAttributes, System.Reflection.RtFieldInfo.Name, and System.SR.RFLCT_Targ_StatFldReqTarg.

Referenced by System.Reflection.RtFieldInfo.GetValue(), and System.Reflection.RtFieldInfo.SetValue().