System.Xml.UTF16Decoder.GetCharCount C# (CSharp) Method

GetCharCount() public method

public GetCharCount ( byte bytes, int index, int count, bool flush ) : int
bytes byte
index int
count int
flush bool
return int
        public override int GetCharCount( byte[] bytes, int index, int count, bool flush ) {
            int byteCount = count + ( ( lastByte >= 0 ) ? 1 : 0 );
            if ( flush && ( byteCount % CharSize != 0 ) ) {
                throw new ArgumentException( Res.GetString( Res.Enc_InvalidByteInEncoding, new object[1] { -1 } ), (string)null );
            }
            return byteCount / CharSize;
        }

Same methods

UTF16Decoder::GetCharCount ( byte bytes, int index, int count ) : int