Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ConstArray.cs
Go to the documentation of this file.
1namespace System.Reflection;
2
3internal readonly struct ConstArray
4{
5 internal readonly int m_length;
6
7 internal readonly IntPtr m_constArray;
8
10
11 public int Length => m_length;
12
13 public unsafe byte this[int index]
14 {
15 get
16 {
17 if (index < 0 || index >= m_length)
18 {
19 throw new IndexOutOfRangeException();
20 }
21 return ((byte*)m_constArray.ToPointer())[index];
22 }
23 }
24}
unsafe void * ToPointer()
Definition IntPtr.cs:210
readonly IntPtr m_constArray
Definition ConstArray.cs:7