System.Net.WebUtility.ValidateUrlEncodingParameters C# (CSharp) Method

ValidateUrlEncodingParameters() private static method

private static ValidateUrlEncodingParameters ( byte bytes, int offset, int count ) : bool
bytes byte
offset int
count int
return bool
        private static bool ValidateUrlEncodingParameters(byte[] bytes, int offset, int count)
        {
            if (bytes == null && count == 0)
                return false;
            if (bytes == null)
            {
                throw new ArgumentNullException(nameof(bytes));
            }
            if (offset < 0 || offset > bytes.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(offset));
            }
            if (count < 0 || offset + count > bytes.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }

            return true;
        }