Covers topics on the Microsoft Certification Exam for the .NET Framework (Exam 70-536, Microsoft .NET Framework - Application Development Foundation)

Saturday, March 8, 2008

Name some commonly used interfaces in .NET

Interfaces act as a "contract" in the .NET Framework. The contract is that all classes implementing the interface will have a common set of members.

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:

Support This Site

LinkShare  Referral  Prg