Export (0) Print
Expand All
Expand Minimize

Compiler Warning (level 3) CS0219 

Error Message

The variable 'variable' is assigned but its value is never used

The compiler issues a level-three warning, when you declare and assign a variable, but do not use it.

The following sample generates CS0219:

// CS0219.cs
// compile with: /W:3
public class MyClass
{
   public static void Main()
   {
      int a = 0;   // CS0219
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft