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

◆ Has< T >()

static bool Extensions.EnumerationExtensions.Has< T > ( this Enum value,
T check )
inlinestatic

Definition at line 67 of file EnumerationExtensions.cs.

68 {
70 _Value value2 = new _Value(check, type);
71 if (value2.Signed is long)
72 {
73 return (Convert.ToInt64(value) & value2.Signed.Value) == value2.Signed.Value;
74 }
75 if (value2.Unsigned is ulong)
76 {
77 return (Convert.ToUInt64(value) & value2.Unsigned.Value) == value2.Unsigned.Value;
78 }
79 return false;
80 }
static long ToInt64(object? value)
Definition Convert.cs:1623
static ulong ToUInt64(object? value)
Definition Convert.cs:1738
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408

References System.Type.GetType(), Extensions.EnumerationExtensions._Value.Signed, System.Convert.ToInt64(), System.Convert.ToUInt64(), System.type, Extensions.EnumerationExtensions._Value.Unsigned, and System.value.