Edit

Share via


Compiler Error CS0128

A local variable named 'variable' is already defined in this scope

The compiler detected declarations of two local variables with the same name. For more information, see Methods.

The following sample generates CS0128:

// CS0128.cs  
namespace MyNamespace  
{  
   public class MyClass  
   {  
      public static void Main()  
      {  
         char i;  
         int i;   // CS0128  
      }  
   }  
}