Expand Minimize
This topic has not yet been rated - Rate this topic

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 (C# Programming Guide).

The following sample generates CS0128:

// CS0128.cs
namespace MyNamespace
{
   public class MyClass
   {
      public static void Main()
      {
         char i;
         int i;   // CS0128
      }
   }
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.