8

Working with Microsoft.CodeAnalysis.CSharp
where I work with CSharpSyntaxTree

I can compile the code in code.

So basically,

SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(@"
using System;

namespace InAppCompiler
{
public class Writer
{
public void PrintText(string message)
{
Console.WriteLine(message);
}

public void ALLCAPS(string msg)
{
Console.WriteLine(msg);
}
}
}");

Freaking cool!

Comments
Add Comment