2 implementations of CastFrom
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1193static byte IUtfChar<byte>.CastFrom(int value) => (byte)value;
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1985static char IUtfChar<char>.CastFrom(int value) => (char)value;
8 references to CastFrom
System.Private.CoreLib (8)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (3)
722result.Append(TChar.CastFrom(nextChar)); 827result.Append(TChar.CastFrom('0' + tens)); 829result.Append(TChar.CastFrom('0' + ones));
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
438result.Append(TChar.CastFrom(nextChar));
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (4)
1482*(--buffer) = TChar.CastFrom(digit + (digit < 10 ? (byte)'0' : hexBase)); 1537*(--buffer) = TChar.CastFrom('0' + (byte)(value & 0x1)); 1930*(--buffer) = TChar.CastFrom(digit + (digit < 10 ? (byte)'0' : hexBase)); 2001*(--buffer) = TChar.CastFrom('0' + (byte)(value & 0x1));