You can wrap a MemoryStream in a BinaryReader :
using(var reader = new BinaryReader(yourStream)) { int someInt = reader.ReadInt32(); }
BinaryReader can be found in the System.IO namespace.
For more information on the methods you can use, see MSDN . Keep in mind that methods follow the Read + CLR pattern. So, ReadInt32() for int, ReadUInt16() for short, etc.
source share