CS0535
C# Programming Language
Severity: MinorWhat Does This Error Mean?
CS0535 means your class says it implements an interface but is missing one or more required members. An interface is like a contract — 'if you implement this interface, you MUST provide these methods'. If you declare 'class MyClass : IMyInterface' but do not provide all the methods the interface requires, C# throws CS0535. The fix is to add the missing methods to your class.
Affected Models
- .NET Framework
- .NET Core
- .NET 5+
- All C# versions
Common Causes
- Declaring a class that implements an interface but not adding all the required methods
- An interface was updated with new members and all implementing classes were not updated
- Implementing a base interface but forgetting that it also requires members from a parent interface it extends
- A typo in the method name means it does not match the interface member exactly
- The method signature (return type or parameters) does not exactly match what the interface specifies
How to Fix It
-
Read the error message — it names both the interface and the specific member that is missing.
Example: 'MyClass does not implement interface member IVehicle.StartEngine()' — you need to add a StartEngine() method to MyClass.
-
In Visual Studio, you can right-click the interface name in your class declaration and choose 'Implement Interface' — it automatically generates stub methods for all missing members.
The generated stubs throw NotImplementedException by default — replace the throw with your actual implementation.
-
Make sure the method signature exactly matches the interface. The return type, method name, and parameter types must all match exactly.
If the interface says: string GetName(); then your class must have: public string GetName() — not public void GetName() or public string getName()
-
Check if the interface extends another interface. If IAnimal extends ILivingThing, implementing IAnimal also requires implementing all of ILivingThing's members.
Look at the full interface definition — it may inherit from one or more parent interfaces, all of whose members are required.
-
If you do not want to implement all members right now, mark the class as abstract: public abstract class MyClass : IMyInterface — abstract classes are not required to implement all interface members, but they cannot be instantiated.
Concrete (non-abstract) classes must implement every interface member. Abstract classes can leave some for subclasses to implement.
When to Call a Professional
CS0535 is always a compile-time error you can fix yourself. The error message tells you exactly which interface member is missing. Add that method to your class with the exact signature specified in the interface.
Frequently Asked Questions
What is an interface in C#?
An interface is a contract that defines what methods and properties a class must have. It says 'any class that claims to be this type MUST have these members'. For example, IDisposable requires a Dispose() method. Any class that says it implements IDisposable must have a Dispose() method. Interfaces enable polymorphism — you can write code that works with any class that implements a given interface.
Can a class implement multiple interfaces?
Yes — C# allows a class to implement as many interfaces as needed. Example: public class MyWidget : IDrawable, IClickable, IResizable The class must implement every member from every interface it declares. This is a key advantage of interfaces over inheritance — C# only allows one base class, but multiple interfaces.
What is the difference between an interface and an abstract class?
An interface only declares what members must exist — it provides no implementation. An abstract class can have some implemented methods and some abstract (unimplemented) ones. A class can inherit from only ONE base class (abstract or not) but can implement MANY interfaces. Modern C# (8.0+) allows interfaces to have default method implementations — but generally interfaces are for contracts and abstract classes for partial implementations.