Of the many interfaces built into the .NET Framework, the interfaces listed below are commonly used and worth committing to memory.
- IComparable (Implemented by types with values that can be ordered, this interface is required for sorting)
- IDisposable (Allows for an object to be manually disposed, important for objects that consume limited or valuable resources)
- IConvertible (Allows a class to be converted to a base type, such as int or string)
- IClonable (Allows the implementing object to be copied)
- IEquatable (Allows for two instances of a class to be compared using the == operator)
- IFormattable (Allows for more control over formatting than the ToString method)
Additional Resources
Interfaces in C# (Microsoft)
Interfaces in VB (Microsoft)
No comments:
Post a Comment