コード例 #1
0
 // does the expression contain declaration?
 public static bool ContainsDeclarations(this ExpressionSyntax node)
 {
     return(node.ContainsNodeThatVerifies(x =>
                                          x.IsKind(SyntaxKind.DeclarationExpression) || x.IsKind(SyntaxKind.DeclarationPattern)));
 }