示例#1
0
 public void ToInt_Converts_Coverted()
 {
     bool[] binaryValue =
     {
         true,
         true,
         false,
         true,
         false,
         false,
         true,
         true,
     };
     Assert.AreEqual(211, BitConverter.ToInt(binaryValue));
 }
示例#2
0
 /// <summary>
 /// Reads a 32-bit signed integer from the stream, using the bit converter
 /// for this reader. 4 bytes are read.
 /// </summary>
 /// <returns>The 32-bit integer read</returns>
 public int ReadInt()
 {
     ReadInternal(buffer, 4);
     return(BitConverter.ToInt(buffer, 0));
 }