Expand Minimize
0 out of 6 rated this helpful - Rate this topic

Compiler Error CS0525 

Error Message

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
   }
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.