Apart from IEnumerable, IComparable, what other "important" (or frequently used) interfaces are there for me to know in C#.NET?
An interface may not declare instance data such as fields, auto-implemented properties, or property-like events. By using interfaces, you can, for example, include behavior from multiple sources in a class. That capability is important in C# because the language doesn't support multiple inheritance of classes.
In C#, an interface can be defined using the interface keyword. An interface can contain declarations of methods, properties, indexers, and events. However, it cannot contain fields, auto-implemented properties. The following interface declares some basic functionalities for the file operations.
An interface is a specification for a set of class members, not an implementation. An Interface is a reference type and it contains only abstract members such as Events, Methods, Properties etc. It contain only declaration for its members and implementation defined as separate entities from classes.
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 class who implements the interface implicitly or explicitly.
Same question
Copy-Paste from there:
IDisposable
is pretty important.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With