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

◆ InternalEmulateRead()

int System.IO.MemoryStream.InternalEmulateRead ( int count)
inlinepackageinherited

Definition at line 302 of file MemoryStream.cs.

303 {
305 int num = _length - _position;
306 if (num > count)
307 {
308 num = count;
309 }
310 if (num < 0)
311 {
312 num = 0;
313 }
314 _position += num;
315 return num;
316 }

References System.IO.MemoryStream._length, System.IO.MemoryStream._position, System.count, and System.IO.MemoryStream.EnsureNotClosed().

Referenced by System.IO.MemoryStream.CopyTo(), System.IO.MemoryStream.CopyToAsync(), and System.IO.BinaryReader.InternalReadChars().