5 instantiations of Utf16Char
System.Runtime.Numerics (5)
System\Number.Polyfill.cs (5)
43public static Utf16Char CastFrom(byte value) => new((char)value); 44public static Utf16Char CastFrom(char value) => new(value); 45public static Utf16Char CastFrom(int value) => new((char)value); 46public static Utf16Char CastFrom(uint value) => new((char)value); 47public static Utf16Char CastFrom(ulong value) => new((char)value);
24 references to Utf16Char
System.Runtime.Numerics (24)
src\libraries\Common\src\System\Text\ValueStringBuilder_1.cs (3)
22Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(Utf16Char))); 31Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(Utf16Char))); 106Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Number.BigInteger.cs (6)
746return FormatBigInteger<Utf16Char>(targetSpan: false, value, format, format, info, default, out _, out _)!; 787Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 860Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 879BigIntegerToDecChars((Utf16Char*)ptr + span.Length, state.base1E9Value, state.digits); 927Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 1412Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Number.Polyfill.cs (9)
38internal readonly struct Utf16Char(char ch) : IUtfChar<Utf16Char> 43public static Utf16Char CastFrom(byte value) => new((char)value); 44public static Utf16Char CastFrom(char value) => new(value); 45public static Utf16Char CastFrom(int value) => new((char)value); 46public static Utf16Char CastFrom(uint value) => new((char)value); 47public static Utf16Char CastFrom(ulong value) => new((char)value); 48public static uint CastToUInt32(Utf16Char value) => value.value; 49public bool Equals(Utf16Char other) => value == other.value; 126Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Numerics\BigInteger.cs (3)
702return Number.ParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider)); 717return Number.TryParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider), out result) == Number.ParsingStatus.OK; 1688return Number.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten);
System\Numerics\Complex.cs (3)
2135=> TryParse(MemoryMarshal.Cast<char, Utf16Char>(s), style, provider, out result); 2264TryFormat(MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten, format, provider); 2273Debug.Assert(typeof(TChar) == typeof(Utf8Char) || typeof(TChar) == typeof(Utf16Char));