ReadBytes() 공개 메소드

public ReadBytes ( Int32 count ) : byte[]
count System.Int32
리턴 byte[]
        public static string Deserialize(BitReader br)
        {
            var length = br.ReadInt32();
            if (length > 0)
            {
                var bytes = br.ReadBytes(length);
                return Encoding.GetEncoding(1252).GetString(bytes, 0, length - 1);
            }
            else if (length < 0)
            {
                var bytes = br.ReadBytes(length * -2);
                return Encoding.Unicode.GetString(bytes, 0, (length * -2) - 2);
            }

            return "";
        }
예제 #2
0
        public static string Deserialize(BitReader br)
        {
            var length = br.ReadInt32();

            if (length > 0)
            {
                var bytes = br.ReadBytes(length);
                return(Encoding.GetEncoding(1252).GetString(bytes, 0, length - 1));
            }
            else if (length < 0)
            {
                var bytes = br.ReadBytes(length * -2);
                return(Encoding.Unicode.GetString(bytes, 0, (length * -2) - 2));
            }

            return("");
        }