|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Diggins.Jigsaw
{
class CodeDOMCompilerTests
{
public static void Tests()
{
string s = @"
using System;
namespace Test
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine(""C# compiles C#!"");
int argc = 0;
foreach (var a in args)
Console.WriteLine(""Argument #{0} is {1}"", argc++, a);
}
}
}
";
var asm = CodeDOMCompilers.CompileCSharp(s);
if (asm != null)
Utilities.RunMain(asm, "Happy", "Sad");
else
Console.WriteLine("Compilation failed");
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.