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

◆ ByteLength()

static int System.Buffer.ByteLength ( Array array)
inlinestatic

Definition at line 156 of file Buffer.cs.

157 {
158 if (array == null)
159 {
160 throw new ArgumentNullException("array");
161 }
162 if (!array.GetCorElementTypeOfElementType().IsPrimitiveType())
163 {
164 throw new ArgumentException(SR.Arg_MustBePrimArray, "array");
165 }
166 nuint num = array.NativeLength * array.GetElementSize();
167 return checked((int)num);
168 }

References System.SR.Arg_MustBePrimArray, and System.array.

Referenced by System.Buffer.GetByte(), and System.Buffer.SetByte().