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

Compiler Error CS0525

Interfaces cannot contain fields

An interface can contain methods and properties but not fields.

The following sample generates CS0525:

// CS0525.cs
namespace x
   public interface clx
      public int i;   // CS0525

Community Additions

© 2015 Microsoft