.NET Fiddle

CSharp · Console

/Program.cs

using System;

public class Program
{
	public static void Main()
	{
		Foo foo = new Foo { Bar = 5};
	}
}

class Foo
{
	public int Bar {get; set;}
}
;