📜  如何在 C# 代码示例中进行强制转换

📅  最后修改于: 2022-03-11 14:48:51.654000             🧑  作者: Mango

代码示例1
// if we have:
float f = 12.0f;
// and we want to put the value of f into 
int x;
// we can cast f to int like this:
x = (int)f //(int) is the cast