Quote Originally Posted by BigEd781 View Post
Well, it may cause an exception at runtime of 'Obj' is not an Employee object under the hood. You would be better served using a safe cast on reference types:

Code:
object o = new Employee();
// some time later
Employee e = o as Employee;
if ( e != null )
{
    // the cast succeeded
}
else
{
    // the cast failed, 'o' is not of the type 'Employee'
}
Understood. Thanks.