Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Compiler Error CS1028

Unexpected preprocessor directive

A preprocessor directive was found but not expected.

For example, a #endif was found with no preceding #if.

The following sample generates CS1028:

// CS1028.cs
#endif   // CS1028, no matching #if
namespace x
{
   public class clx
   {
      public static void Main()
      {
      }
   }
}

Community Additions

ADD
Show:
© 2015 Microsoft