Checking a Variable Type For Code Analysis
问题 What is the correct way to check a variable's type in a Roslyn code analyzer? I am registering for a ObjectCreationExpressionSyntax node and I can get the type, but I am not certain the correct way to check that it is a type I care about. I found a way to do it by checking the display string, but I am wondering if there is a more correct way to accomplish this. For example, here is code that is trying to check for an ArrayList creation. private static void SyntaxValidator