2 implementations of CastFrom
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
1211static byte IUtfChar<byte>.CastFrom(int value) => (byte)value;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
2083static 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)
894result.Append(TChar.CastFrom('0' + tens)); 896result.Append(TChar.CastFrom('0' + ones));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
313suffix[0] = TChar.CastFrom('0' + (int)hours);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (2)
867if (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)
1883buffer[i] = TChar.CastFrom(digit + (digit < 10 ? (byte)'0' : hexBase)); 1930buffer[i] = TChar.CastFrom('0' + (byte)(value & 0x1)); 2188buffer[i] = TChar.CastFrom(digit + (digit < 10 ? (byte)'0' : hexBase)); 2251buffer[i] = TChar.CastFrom('0' + (byte)(value & 0x1));