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

◆ ToInt64() [1/2]

static long System.BitConverter.ToInt64 ( byte[] value,
int startIndex )
inlinestatic

Definition at line 274 of file BitConverter.cs.

275 {
276 if (value == null)
277 {
278 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.value);
279 }
280 if ((uint)startIndex >= (uint)value.Length)
281 {
282 ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.startIndex, ExceptionResource.ArgumentOutOfRange_Index);
283 }
284 if (startIndex > value.Length - 8)
285 {
286 ThrowHelper.ThrowArgumentException(ExceptionResource.Arg_ArrayPlusOffTooSmall, ExceptionArgument.value);
287 }
288 return Unsafe.ReadUnaligned<long>(ref value[startIndex]);
289 }

References System.startIndex, System.ThrowHelper.ThrowArgumentException(), System.ThrowHelper.ThrowArgumentNullException(), System.ThrowHelper.ThrowArgumentOutOfRangeException(), and System.value.

Referenced by System.BitConverter.ToDouble(), and System.BitConverter.ToUInt64().