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

GetByteCount() private method

private GetByteCount ( String s ) : int
s String
return int
        public unsafe override int GetByteCount(String s)
        {
            // Validate input
            if (s == null)
                throw new ArgumentNullException(nameof(s));
            Contract.EndContractBlock();

            fixed (char* pChars = s)
                return GetByteCount(pChars, s.Length, null);
        }

Same methods

EncodingNLS::GetByteCount ( char chars, int count ) : int
EncodingNLS::GetByteCount ( char chars, int count, EncoderNLS encoder ) : int
EncodingNLS::GetByteCount ( char chars, int index, int count ) : int

Usage Example

示例#1
0
        public override unsafe int GetByteCount(char *chars, int count, bool flush)
        {
            if (chars is null)
            {
                throw new ArgumentNullException(nameof(chars));
            }

            if (count < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
            }

            m_mustFlush       = flush;
            m_throwOnOverflow = true;
            return(m_encoding.GetByteCount(chars, count, this));
        }
All Usage Examples Of System.Text.EncodingNLS::GetByteCount