Complete the code to declare a record named Person with two properties.
public record Person(string [1], int Age);The record property should be named Name to match common conventions.
Complete the code to create two Person records with the same values.
var person1 = new Person("Alice", 30); var person2 = new Person("Alice", [1]);
Both records must have the same age 30 to be equal by value.
Fix the error in the equality check between two Person records.
bool areEqual = person1 [1] person2;Use the == operator to check value equality between records.
Fill both blanks to override the ToString method in the Person record.
public override string ToString() => $"[1]: [2]";
The ToString method should return the person's Name and Age values.
Fill all three blanks to create a new Person record with updated Age using the with-expression.
var olderPerson = person1 with { [1] = [2] + [3] };
The with-expression updates the Age property by adding 1 to person1.Age.
