Source/NFX/IOMiscUtils.cs
/// <summary>
/// Reads an ushort encoded as little endian from stream
/// </summary>
Reads an ushort encoded as little endian from stream
Reads an ushort encoded as little endian from stream
public static ushort ReadLEUShort(this Stream s)
        {
            var b1 = s.ReadByte();
            if (b1<0) throw new IO.NFXIOException(StringConsts.STREAM_READ_EOF_ERROR+"ReadLEUShort()");
            var b2 = s.ReadByte();
            if (b2<0) throw new IO.NFXIOException(StringConsts.STREAM_READ_EOF_ERROR+"ReadLEUShort()");
            return (ushort)((b2 << 8) + b1);
        }
public static ushort ReadLEUShort ( this Stream s ) { var b1 = s . ReadByte ( ) ; if ( b1 < 0 ) throw new IO . NFXIOException ( StringConsts . STREAM_READ_EOF_ERROR + " " ) ; var b2 = s . ReadByte ( ) ; if ( b2 < 0 ) throw new IO . NFXIOException ( StringConsts . STREAM_READ_EOF_ERROR + " " ) ; return ( ushort ) ( ( b2 << 8 ) + b1 ) ; }
Reads an ushort encoded as little endian from stream
Reads an ushort encoded as little endian from stream
Stream
this
<not_specific>