System.Text.ISO2022Encoding.GetByteCount C# (CSharp) Method

GetByteCount() private method

private GetByteCount ( char chars, int count, EncoderNLS baseEncoder ) : int
chars char
count int
baseEncoder EncoderNLS
return int
        public unsafe override int GetByteCount(char* chars, int count, EncoderNLS baseEncoder)
        {
            // Just need to ASSERT, this is called by something else internal that checked parameters already
            Debug.Assert(count >= 0, "[ISO2022Encoding.GetByteCount]count is negative");
            Debug.Assert(chars != null, "[ISO2022Encoding.GetByteCount]chars is null");

            // Just call GetBytes with null byte* to get count
            return GetBytes(chars, count, null, 0, baseEncoder);
        }