Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error CS0107
Collapse the table of content
Expand the table of content

Compiler Error CS0107

More than one protection modifier

Only one access modifier (public, private, protected, or internal) is allowed on a class member, with the exception of except internal protected.

The following sample generates CS0107:

// CS0107.cs
public class C
{
   private internal void f()   // CS0107, delete private or internal
   {
   }

   public static int Main()
   {
      return 1;
   }
}
Show:
© 2015 Microsoft