Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
StringSequenceMany.cs
Go to the documentation of this file.
2
3internal struct StringSequenceMany : IEquatable<StringSequenceMany>, IStringSequence
4{
5 private readonly string[] _values;
6
7 public StringSequenceMany(string[] values)
8 {
10 }
11
13 {
14 return _values.AsSpan();
15 }
16
18 {
19 if (_values.Length != other._values.Length)
20 {
21 return false;
22 }
23 for (int i = 0; i < _values.Length; i++)
24 {
25 if (_values[i] != other._values[i])
26 {
27 return false;
28 }
29 }
30 return true;
31 }
32
33 public override bool Equals(object obj)
34 {
36 {
37 return Equals(other);
38 }
39 return false;
40 }
41
42 public override int GetHashCode()
43 {
44 HashCode hashCode = default(HashCode);
45 for (int i = 0; i < _values.Length; i++)
46 {
47 hashCode.Add(_values[i]);
48 }
49 return hashCode.ToHashCode();
50 }
51}
void Add(int value)
Definition HashCode.cs:239