This sample allows you to highlight C# source code. Highlighting is based on http://hilite.me web service, which is called from a background job in a truly asynchronous way – neither controller, nor any other entity is waiting for a completion. Results are delivered via WebSockets using SignalR.

All the snippets are removed every day at 12:00 AM UTC.

test
Console.Writeline("Hello world");
using var db = new DbContext();
public class Test
{
    public int Demo()
    {
        return 42;
    }
}
Console.WriteLine("Hello, world!");
return true;
public class Test
{
    public int Demo()
    {
        return 42;
    }
}
dbfdsb
// I/O code
public void Shell()
{
    var a = Console.ReadLine();
    var b = Console.ReadLine();

    var r = CompareTwoStrings(a, b);

    switch (r)
    {
        case StringCompareResult.Bigger:
            break;
        case StringCompareResult.Smaller:
            break;
        case StringCompareResult.Equal:
            break;
        default:
            break;
    }
}
 public enum StringCompareResult
 {
     Bigger,
     Smaller,
     Equal
 }
Console.WriteLine("Hello, world!");
safsacsac
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");
Console.WriteLine("Hello, world!");