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)); }
[System.Security.SecurityCritical] // auto-generated public unsafe int GetByteCount(char *chars, int count, bool flush) { // Validate input parameters if (chars == null) { throw new ArgumentNullException("chars", SR.ArgumentNull_Array); } if (count < 0) { throw new ArgumentOutOfRangeException("count", SR.ArgumentOutOfRange_NeedNonNegNum); } Contract.EndContractBlock(); m_mustFlush = flush; m_throwOnOverflow = true; return(m_encoding.GetByteCount(chars, count, this)); }