System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadBytes C# (CSharp) Method

ReadBytes() private method

private ReadBytes ( int length ) : Byte[]
length int
return Byte[]
		internal Byte[] ReadBytes(int length)
		{
			return dataReader.ReadBytes(length);
		}

Same methods

__BinaryParser::ReadBytes ( byte byteA, int offset, int size ) : void

Usage Example

 public void Read(__BinaryParser input)
 {
     byte[] buffer = input.ReadBytes(0x11);
     if (buffer.Length < 0x11)
     {
         __Error.EndOfFile();
     }
     this.majorVersion = GetInt32(buffer, 9);
     if (this.majorVersion > this.binaryFormatterMajorVersion)
     {
         throw new SerializationException(Environment.GetResourceString("Serialization_InvalidFormat", new object[] { BitConverter.ToString(buffer) }));
     }
     this.binaryHeaderEnum = (BinaryHeaderEnum) buffer[0];
     this.topId = GetInt32(buffer, 1);
     this.headerId = GetInt32(buffer, 5);
     this.minorVersion = GetInt32(buffer, 13);
 }
All Usage Examples Of System.Runtime.Serialization.Formatters.Binary.__BinaryParser::ReadBytes