Skip to content

Instantly share code, notes, and snippets.

@pparadis
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pparadis/10945622 to your computer and use it in GitHub Desktop.
Save pparadis/10945622 to your computer and use it in GitHub Desktop.
// Using static class
using System.Console;
// Primary constructor
class Point(double x, double y)
{
// Auto-property initializers and getter-only auto-properties
public double X { get; } = x;
public double Y { get; } = y;
public void PrintMe()
{
WriteLine("{0}, {1}", X, Y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment