C Sharp (C#) - Properties and Encapsulation
Consider the following code:
What will happen when this code runs?
public class User {
public string Username { get; init; }
}
var user = new User { Username = "John" };
user.Username = "Jane";What will happen when this code runs?
