NET - Define most commonly used interfaces in Net Framework

Define most commonly used interfaces in Net Framework.

1. IComparable : It is implemented by types for ordering and sorting. The implementation types must implement one single method i.e. CompareTo.

2. IDisposable : This is implemented to manage release of unmanaged resources from memory. The garbage collector acts on its own and hence the Dispose method is used to call the garbage collector to free unmanaged resources through this interface.

3. IConvertible : It is implemented to convert value of the implementing type into another CLR compatible type. If the conversion fails then an invalidcastexception is thrown.

4. ICloneable : Allows creating objects of a class having same values as another instance using the Clone method.

5. IEquatable : Implemented to create type specific methods to know the equality between various objects.

6. IFormattable : Implemented to convert object into string representations. Objects can define their own specific string representation through this interface’s ToString() method.
NET - Explain how to create and consume a Generic type.
Answer - Explain how to create and consume a Generic type.....
NET - What is Type Forwarding in NET?
What is Type Forwarding in NET? - Type forwarding is a technique to move types from one assembly to another......
NET - What is SOAPFormatter? Explain how to serialize an object
What is SOAPFormatter? - It is an xml based serialization technique which is used to serialize and deserialize objects and data across networks.......
Post your comment