Skip to content

Instantly share code, notes, and snippets.

@adbre
Forked from jonwarghed/WeirdSyntax.cs
Last active August 23, 2017 09:28
Show Gist options
  • Save adbre/746544f9ba927fc0706ec603fabf720c to your computer and use it in GitHub Desktop.
Save adbre/746544f9ba927fc0706ec603fabf720c to your computer and use it in GitHub Desktop.
What is this C# syntax called?
namespace Trine.CLI
{
class Program
{
static void Main()
{
new Crash
{
Inner = {Name = "what"}
};
}
}
public class InnerType {
public string Name { get; set; }
}
public class Crash
{
public Crash() {
Inner = new InnerType();
}
public InnerType Inner { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment