A Delegate is an object which refers to a method or you can say it is a reference type variable that can hold a reference to the methods. Delegates in C# are similar to the function pointer in C/C++. It provides a way which tells which method is to be called when an event is triggered.
[190 + 70] = 
Like a class, Interface can have methods, properties, events, and indexers as its members. But interfaces will contain only the declaration of the members. The implementation of the interface’s members will be given by the class who implements the interface implicitly or explicitly.
Welcome to GeeksforGeeks..!
Below are some differences between the Delegates and Interfaces in C#:
|It could be a method only.||It contains both methods and properties.|
|It can be applied to one method at a time.||If a class implements an interface, then it will implement all the methods related to that interface.|
|If a delegate available in your scope you can use it.||Interface is used when your class implements that interface, otherwise not.|
|Delegates can me implemented any number of times.||Interface can be implemented only one time.|
|It is used to handling events.||It is not used for handling events.|
|It can access anonymous methods.||It can not access anonymous methods.|
|When you access the method using delegates you do not require any access to the object of the class where the method is defined.||When you access the method you need the object of the class which implemented an interface.|
|It does not support inheritance.||It supports inheritance.|
|It can wrap static methods and sealed class methods||It does not wrap static methods and sealed class methods..|
|It created at run time.||It created at compile time.|
|It can implement any method that provides the same signature with the given delegate.||If the method of interface implemented, then the same name and signature method override.|
|It can wrap any method whose signature is similar to the delegate and does not consider which from class it belongs.||A class can implement any number of interfaces, but can only override those methods which belongs to the interfaces.|
- C# | Delegates
- C# | Inheritance in interfaces
- C# | Multiple inheritance using interfaces
- C# | How to Implement Multiple Interfaces Having Same Method Name
- Difference between Bottom-Up Model and Top-Down Model
- Difference between Inheritance and Polymorphism
- Difference between Single and Multiple Inheritance in C++
- Difference between Abstraction and Encapsulation in C++
- Difference between Iterator and Enumeration in Java with Examples
- Difference between Public and Private in C++ with Example
- Difference between SVG and JPEG
- Difference between Linear and Non-linear Data Structures
- Difference between Tester and SDET
- Difference between Software Testing and Embedded Testing
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.