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.

Console.WriteLine("Hello");
public void 2080(){

}
public void Test2090(){

}
public void Test1090(){

}
werewrwer
Console.WriteLine("Salve, Juu!");
System.Console.WriteLine("Salve Ju!")
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
Console.WriteLine("asfkjaflkafj");
public class Demo {
}
;
var s = "SS";
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!")
    }
  }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World1111111!")
    }
  }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!")
    }
  }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!")
    }
  }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}
rtez
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}
test
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
using System.Net;
using System.Web.Mvc;
using Microsoft.SharePoint.Client;

namespace SharePointAddInWeb.Controllers
{
    public class HomeController : Controller
    {
        [SharePointContextFilter]
        public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {
                clientContext.Credentials = new NetworkCredential("SPAdmin", "Adm+123", "CORP");

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
public ActionResult Index()
        {
            var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

            //using (var clientContext = spContext.CreateUserClientContextForSPHost())
            using (var clientContext = new ClientContext(spContext.SPHostUrl))
            {
                clientContext.Credentials = new NetworkCredential("SPAdmin", "Adm+123", "CORP");

                if (clientContext != null)
                {
                    var spUser = clientContext.Web.CurrentUser;
                    clientContext.Load(spUser, user => user.Title);
                    clientContext.ExecuteQuery();
                    ViewBag.UserName = spUser.Title;
                }
            }

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
string s = "test";
use System;
public class HelloWorld{

int thisIsFine;
}
private static TResult RunSync<TResult>(Func<Task<TResult>> func)
    {
        return Task.Run<Task<TResult>>(func).Unwrap().GetAwaiter().GetResult();
    }
var x = 5;
hello var =x
while (true)
{
system.threading.sleep(1000);
}
var c = "123";
var x = 1;
Console.WriteLine("Hello, world!");