C Sharp (C#) - Properties and Encapsulation
What will be the output of this code?
class Book {
public string Title { get; private set; } = "Unknown";
public void SetTitle(string title) {
Title = title;
}
}
var book = new Book();
book.SetTitle("C# Guide");
Console.WriteLine(book.Title);