Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 25, 2021 11:09
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 lgolubyev/d7d888e5dd8b4467d95f4311b3ae7a36 to your computer and use it in GitHub Desktop.
Save lgolubyev/d7d888e5dd8b4467d95f4311b3ae7a36 to your computer and use it in GitHub Desktop.
Point point1 = new(1, 2);
Console.WriteLine(point1.ToString());
Point point2 = new(1, 2)};
Console.WriteLine(point1.Equals(point2));
public record Point
{
public int X { get;}
public int Y { get;}
public Point(int x, int y) => (X, Y) = (x, y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment