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

◆ GetHashCode()

override int System.Net.NetworkInformation.PhysicalAddress.GetHashCode ( )
inline

Definition at line 19 of file PhysicalAddress.cs.

20 {
21 if (_hash == 0)
22 {
23 int num = 0;
24 int num2 = _address.Length & -4;
25 int i;
26 for (i = 0; i < num2; i += 4)
27 {
29 }
30 if (((uint)_address.Length & 3u) != 0)
31 {
32 int num3 = 0;
33 int num4 = 0;
34 for (; i < _address.Length; i++)
35 {
36 num3 |= _address[i] << num4;
37 num4 += 8;
38 }
39 num ^= num3;
40 }
41 if (num == 0)
42 {
43 num = 1;
44 }
45 _hash = num;
46 }
47 return _hash;
48 }
static int ReadInt32LittleEndian(ReadOnlySpan< byte > source)

References System.Net.NetworkInformation.PhysicalAddress._address, System.Net.NetworkInformation.PhysicalAddress._hash, and System.Buffers.Binary.BinaryPrimitives.ReadInt32LittleEndian().

Referenced by System.Net.NetworkInformation.PhysicalAddress.Equals().