2 implementations of CastFrom
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1211
static byte IUtfChar<byte>.
CastFrom
(int value) => (byte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
2083
static char IUtfChar<char>.
CastFrom
(int value) => (char)value;
9 references to CastFrom
System.Private.CoreLib (9)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (2)
894
result.Append(TChar.
CastFrom
('0' + tens));
896
result.Append(TChar.
CastFrom
('0' + ones));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
313
suffix[0] = TChar.
CastFrom
('0' + (int)hours);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (2)
867
if (guidString.Length > 1 && guidString[0] == TChar.CastFrom('0') && (guidString[1] | TChar.
CastFrom
(0x20)) == TChar.CastFrom('x'))
996
(str[i + 1] | TChar.
CastFrom
(0x20)) == TChar.CastFrom('x');
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (4)
1883
buffer[i] = TChar.
CastFrom
(digit + (digit < 10 ? (byte)'0' : hexBase));
1930
buffer[i] = TChar.
CastFrom
('0' + (byte)(value & 0x1));
2188
buffer[i] = TChar.
CastFrom
(digit + (digit < 10 ? (byte)'0' : hexBase));
2251
buffer[i] = TChar.
CastFrom
('0' + (byte)(value & 0x1));