Ejemplo n.º 1
0
 /// <summary>
 /// 从流中读入一个 <see cref="T:System.Int16"/>
 /// </summary>
 /// <param name="stream">要读取的流</param>
 /// <returns>读取的 <see cref="T:System.Int16"/></returns>
 public static short ReadInt16(this System.IO.Stream stream)
 {
     return(BitConverter.ToInt16(stream.ReadBuffer(2), 0));
 }