Before you attempt to use an object through an interface it's best to discover if the object in fact supports the interface. Obviously if you have the definition of the class, it's easy to look at it and see if the class implements the interface. However, sometimes you may be dealing with the object data type and you may want to see if the object the variable points to is compatible with the interface you want to use. There are two ways of finding out if an object supports the interface. To discover if an object supports the interface:
Tips
|