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);
33 references to Utf16Char
System.Runtime.Numerics (33)
src\runtime\src\libraries\Common\src\System\Text\ValueStringBuilder_1.cs (3)
23Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(Utf16Char))); 32Debug.Assert((typeof(TChar) == typeof(Utf8Char)) || (typeof(TChar) == typeof(Utf16Char))); 110Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Number.BigInteger.cs (6)
806return FormatBigInteger<Utf16Char>(targetSpan: false, value, format, format, info, default, out _, out _)!; 847Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 919Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 938BigIntegerToDecChars((Utf16Char*)ptr + span.Length, state.base1E9Value, state.digits); 986Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 1588Debug.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; 129Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Numerics\BigInteger.cs (5)
831return Number.ParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider)); 846return Number.TryParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 862return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char, Utf16Char>(s.AsSpan()), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 874return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char, Utf16Char>(s), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 1881return Number.TryFormatBigInteger(this, format, NumberFormatInfo.GetInstance(provider), MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten);
System\Numerics\Complex.cs (5)
807return Complex<double>.TryParse(MemoryMarshal.Cast<char, Utf16Char>(s), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out _); 821return Complex<double>.TryParsePartial(MemoryMarshal.Cast<char, Utf16Char>(s.AsSpan()), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out charsConsumed); 835return Complex<double>.TryParsePartial(MemoryMarshal.Cast<char, Utf16Char>(s), style, provider, out Unsafe.As<Complex, Complex<double>>(ref result), out charsConsumed); 867TryFormat(MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten, format, provider); 876Debug.Assert(typeof(TChar) == typeof(Utf8Char) || typeof(TChar) == typeof(Utf16Char));
System\Numerics\Complex.Generic.cs (5)
1892=> TryParse(MemoryMarshal.Cast<char, Utf16Char>(s), style, provider, out result, out _); 1900=> TryParsePartial(MemoryMarshal.Cast<char, Utf16Char>(s.AsSpan()), style, provider, out result, out charsConsumed); 1908=> TryParsePartial(MemoryMarshal.Cast<char, Utf16Char>(s), style, provider, out result, out charsConsumed); 2073TryFormat(MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten, format, provider); 2082Debug.Assert(typeof(TChar) == typeof(Utf8Char) || typeof(TChar) == typeof(Utf16Char));