This documentation is archived and is not being maintained.

Compiler Error CS0524 

Error Message

'type' : interfaces cannot declare types

An interface cannot contain a user-defined type; it should contain only methods and properties.

Example

The following sample generates CS0524:

// CS0524.cs
public interface Clx
{
    public class Cly   // CS0524, delete user-defined type
    {
    }
}

Show: