This documentation is archived and is not being maintained.

Compiler Error CS1004

Visual Studio 2008

Duplicate 'modifier' modifier

A duplicate modifier, such as an access modifier, was detected.

The following sample generates CS1004:

// CS1004.cs
public class clx
{
   public public static void Main()   // CS1004, two public keywords
   {
   }
}
Show: