コード例 #1
0
        private static void SyntaxReplacer()
        {
            SyntaxTree          tree     = CSharpSyntaxTree.ParseText(codeTryCatch);
            CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter();
            var newRoot = rewriter.Visit(tree.GetRoot());

            Console.WriteLine(newRoot.ToFullString());
        }
コード例 #2
0
 private static void SyntaxReplacer()
 {
     SyntaxTree tree = CSharpSyntaxTree.ParseText(codeTryCatch);
     CatchSyntaxRewriter rewriter = new CatchSyntaxRewriter();
     var newRoot=rewriter.Visit(tree.GetRoot());
     Console.WriteLine(newRoot.ToFullString());
 }