Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ByteEqualityComparer.cs
Go to the documentation of this file.
3
5
7[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
8public sealed class ByteEqualityComparer : EqualityComparer<byte>
9{
10 [MethodImpl(MethodImplOptions.AggressiveInlining)]
11 public override bool Equals(byte x, byte y)
12 {
13 return x == y;
14 }
15
16 [MethodImpl(MethodImplOptions.AggressiveInlining)]
17 public override int GetHashCode(byte b)
18 {
19 return b.GetHashCode();
20 }
21
22 public override bool Equals([NotNullWhen(true)] object? obj)
23 {
24 if (obj != null)
25 {
26 return GetType() == obj.GetType();
27 }
28 return false;
29 }
30
31 public override int GetHashCode()
32 {
33 return GetType().GetHashCode();
34 }
35}
override bool Equals([NotNullWhen(true)] object? obj)