更新:2007 年 11 月
错误消息
“l”后缀很容易与数字“1”混淆 -- 为清楚起见,请使用“L”
编译器在检测到转换到的 long 所使用的是小写 l 而不是大写 L 时发出警告。
下面的示例生成 CS0078:
// CS0078.cs
// compile with: /W:4
class test {
public static void TestL(long i)
{
}
public static void TestL(int i)
{
}
public static void Main()
{
TestL(25l); // CS0078
// try the following line instead
// TestL(25L);
}
}