15 references to Utf16Char
System.Runtime.Numerics (15)
System\Number.BigInteger.cs (7)
105if (!TryStringToNumber(MemoryMarshal.Cast<char, Utf16Char>(value), style, ref number, info)) 845BigIntegerToDecChars((Utf16Char*)ptr + strLength, base1E9Value, digits); 863BigIntegerToDecChars((Utf16Char*)ptr + span.Length, new ReadOnlySpan<uint>((void*)state.ptr, state.Length), state.digits); 884scoped var vlb = new ValueListBuilder<Utf16Char>(stackalloc Utf16Char[CharStackBufferSize]); // arbitrary stack cut-off 897spanSuccess = vlb.TryCopyTo(MemoryMarshal.Cast<char, Utf16Char>(destination), out charsWritten); 904strResult = MemoryMarshal.Cast<Utf16Char, char>(vlb.AsSpan()).ToString();
System\Number.Polyfill.cs (8)
32internal readonly struct Utf16Char(char ch) : IUtfChar<Utf16Char> 37public static Utf16Char CastFrom(byte value) => new((char)value); 38public static Utf16Char CastFrom(char value) => new(value); 39public static Utf16Char CastFrom(int value) => new((char)value); 40public static Utf16Char CastFrom(uint value) => new((char)value); 41public static Utf16Char CastFrom(ulong value) => new((char)value); 42public static uint CastToUInt32(Utf16Char value) => value.value; 43public bool Equals(Utf16Char other) => value == other.value;