You do not need to throw an object if it has a type that implements an interface.
IMyBehaviour subject = myObject;
If myObject is just an Object , then you need to throw. I would do it like this:
IMyBehaviour subject = myObject as IMyBehaviour;
If myObject does not implement this interface, you will get subject null . You will probably need to check it before listing it.
jdehaan
source share