System.Text.Utf8.Utf8CodeUnit.Utf8CodeUnit C# (CSharp) Method

Utf8CodeUnit() public method

public Utf8CodeUnit ( char value ) : System.Runtime.CompilerServices
value char
return System.Runtime.CompilerServices
        public Utf8CodeUnit(char value)
        {
            if (!IsAscii(value))
            {
                throw new ArgumentOutOfRangeException("value", "Character cannot be represented as single utf-8 code unit. It needs to be ASCII. For complex characters use UnicodeCodePoint.");
            }

            _value = unchecked((byte)(value & UnicodeConstants.AsciiMaxValue));
        }