Skip to content

Instantly share code, notes, and snippets.

@bookercodes
Last active October 2, 2015 00:42
Show Gist options
  • Select an option

  • Save bookercodes/ac7655f26ce3860e6dd9 to your computer and use it in GitHub Desktop.

Select an option

Save bookercodes/ac7655f26ce3860e6dd9 to your computer and use it in GitHub Desktop.
public string this[int index]
{
get { return ""; }
}
// versus.
public string this[int index] => "";
public static Person operator +(Person c1, Person c2)
{
return new Person();
}
// versus.
public static Person operator +(Person c1, Person c2) => new Person();
public int Age
{
get { return 10; }
}
// versus.
public int Age => 10;
public void SayHi()
{
Console.WriteLine("Hi");
}
// versus.
public void SayHi() => Console.WriteLine("Hi");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment