Skip to content

Instantly share code, notes, and snippets.

foreach (var item in collection)
{
DoSomething(item);
}
using System;
using Microsoft.Extensions.Logging;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var logFactory = new LoggerFactory()
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace NETCoreTests
{
[TestClass]
public class TestClass
{
[TestMethod]
public void TestMethodPass()
{
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
namespace ConsoleApplication
{
public class Program
{
<html>
<head>
<title>Hello</title>
<head>
<body>Hello, @ViewBag.Name</body>
</html>
using Microsoft.AspNetCore.Mvc;
namespace ConsoleApplication
{
public class HomeController : Controller
{
[HttpGet("/{name}")]
public IActionResult Index(string name)
{
ViewBag.Name = name;
using System;
using Microsoft.AspNetCore.Mvc;
namespace ConsoleApplication
{
public class HomeController
{
[HttpGet("/{name}")]
public string Index(string name)
{
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace ConsoleApplication
{
public class Startup
{
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
namespace ConsoleApplication
{
public class Startup
{
public void Configure(IApplicationBuilder app)
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)