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

◆ BinarySearch()

static int System.Type.BinarySearch ( Array array,
object value )
inlinestaticprivateinherited

Definition at line 1269 of file Type.cs.

1270 {
1271 ulong[] array2 = new ulong[array.Length];
1272 for (int i = 0; i < array.Length; i++)
1273 {
1274 array2[i] = Enum.ToUInt64(array.GetValue(i));
1275 }
1276 ulong value2 = Enum.ToUInt64(value);
1277 return Array.BinarySearch(array2, value2);
1278 }

References System.array, System.Array.BinarySearch(), System.Enum.ToUInt64(), and System.value.

Referenced by System.Type.GetEnumName(), and System.Type.IsEnumDefined().