SyntaxFix
Write A Post
Hire A Developer
Questions
This should answer that question, and then some.
The second line, if (obj.GetType() == typeof(ClassA)) {}, is faster, for those that don't want to read the article.
if (obj.GetType() == typeof(ClassA)) {}
(Be aware that they don't do the same thing)