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