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

◆ GetHashCode()

override int System.Attribute.GetHashCode ( )
inlineinherited

Definition at line 720 of file Attribute.cs.

721 {
722 Type type = GetType();
723 while (type != typeof(Attribute))
724 {
725 FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
726 object obj = null;
727 for (int i = 0; i < fields.Length; i++)
728 {
729 object value = fields[i].GetValue(this);
730 if (value != null && !value.GetType().IsArray)
731 {
732 obj = value;
733 }
734 if (obj != null)
735 {
736 break;
737 }
738 }
739 if (obj != null)
740 {
741 return obj.GetHashCode();
742 }
743 type = type.BaseType;
744 }
745 return type.GetHashCode();
746 }
object? GetValue(object? obj)

References System.Reflection.FieldInfo.GetValue(), System.obj, System.type, and System.value.