Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created May 25, 2021 11:08
Show Gist options
  • Save lgolubyev/7bd6b8afd3ff4d920c268f398901aaf7 to your computer and use it in GitHub Desktop.
Save lgolubyev/7bd6b8afd3ff4d920c268f398901aaf7 to your computer and use it in GitHub Desktop.
Point point1 = new() { X = 1, Y = 2};
Point point2 = point1 with { Y = 4};
Console.WriteLine(point1.ToString());
public record Point
{
public int X { get; init;}
public int Y { get; init;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment