C Sharp (C#) - Properties and Encapsulation
Given this record declaration:
What is the output?
public record Book {
public string Title { get; init; }
public string Author { get; init; }
}
var book1 = new Book { Title = "C# Guide", Author = "Jane" };
var book2 = book1 with { Author = "John" };
Console.WriteLine(book2.Title + ", " + book2.Author);What is the output?
