Created
October 5, 2021 20:05
-
-
Save mirmostafa/4ac2810865a0ce495191d771c9f1089a 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
| internal readonly record struct Person(string Name, int Age); | |
| var people = new List<Person> { new("Ali", 20), new("Reza", 30), new("Mohammad", 40) }; | |
| var behzad = people.FirstOrDefault(x => x.Name == "Behzad", new("Behzad", 37)); | |
| output: Person { Name = Behzad, Age = 37 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment