System.Text.Latin1Encoding.GetCharCount C# (CSharp) Method

GetCharCount() private method

private GetCharCount ( byte bytes, int count, DecoderNLS decoder ) : int
bytes byte
count int
decoder DecoderNLS
return int
        internal override unsafe int GetCharCount(byte* bytes, int count, DecoderNLS decoder)
        {
            // Just assert, we're called internally so these should be safe, checked already
            BCLDebug.Assert(bytes != null, "[Latin1Encoding.GetCharCount]bytes is null");
            BCLDebug.Assert(count >= 0, "[Latin1Encoding.GetCharCount]byteCount is negative");

            // Just return length, SBCS stay the same length because they don't map to surrogate
            // pairs and we don't have to fallback because all latin1Encoding code points are unicode
            return count;
        }