Last active
July 3, 2020 10:50
-
-
Save zHaytam/66a722f280798fef0c3d297fe7af0c9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var rect = new Rectangle(10, 5); | |
var widerRect = rect with { Width = 20 }; | |
var longerRect = widerRect with { Height = 10 }; | |
Console.WriteLine(rect.Equals(widerRect)); // False | |
Console.WriteLine(widerRect.Equals(longerRect)); // False | |
} | |
public record Rectangle(double Width, double Height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment