5 instantiations of Utf16Char
System.Runtime.Numerics (5)
System\Number.Polyfill.cs (5)
46public static Utf16Char CastFrom(byte value) => new((char)value); 47public static Utf16Char CastFrom(char value) => new(value); 48public static Utf16Char CastFrom(int value) => new((char)value); 49public static Utf16Char CastFrom(uint value) => new((char)value); 50public static Utf16Char CastFrom(ulong value) => new((char)value);
34 references to Utf16Char
System.Runtime.Numerics (34)
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)
807return FormatBigInteger<Utf16Char>(targetSpan: false, value, format, format, info, default, out _, out _)!; 908Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 924BigIntegerToDecChars(Unsafe.BitCast<Span<char>, Span<Utf16Char>>(span.Slice(state.sNegative.Length)), state.base1E9Value, state.digits); 968Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 1017Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 1593Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Number.Polyfill.cs (10)
39internal readonly struct Utf16Char(char ch) : IUtfChar<Utf16Char> 46public static Utf16Char CastFrom(byte value) => new((char)value); 47public static Utf16Char CastFrom(char value) => new(value); 48public static Utf16Char CastFrom(int value) => new((char)value); 49public static Utf16Char CastFrom(uint value) => new((char)value); 50public static Utf16Char CastFrom(ulong value) => new((char)value); 51public static uint CastToUInt32(Utf16Char value) => value.value; 52public bool Equals(Utf16Char other) => value == other.value; 124Debug.Assert(typeof(TChar) == typeof(Utf16Char)); 138Debug.Assert(typeof(TChar) == typeof(Utf16Char));
System\Numerics\BigInteger.cs (5)
835return Number.ParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider)); 850return Number.TryParseBigInteger(MemoryMarshal.Cast<char, Utf16Char>(value), style, NumberFormatInfo.GetInstance(provider), out result, out _) == Number.ParsingStatus.OK; 866return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char, Utf16Char>(s.AsSpan()), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 878return Number.TryParseBigIntegerPartial(MemoryMarshal.Cast<char, Utf16Char>(s), style, NumberFormatInfo.GetInstance(provider), out result, out charsConsumed) == Number.ParsingStatus.OK; 2324return 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));