Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 4) CS0078

The 'l' suffix is easily confused with the digit '1' -- use 'L' for clarity

The compiler warns when it detects a cast to long using a lowercase l instead of an uppercase L.

The following sample generates 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);
   }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.