I need some help. It is pretty easy. I have this piece of code, and I would like to discuss if it is correct, or if you suggest a better way to do it. I have an idea about the a
Within those if statements you can just cast your object like this:
if
var myObjectB = (ClassB)myObject;
or cast it directly:
((ClassB)myObject).MethodJustInB();