C Sharp (C#) - Properties and Encapsulation
What will be the output of the following C# code?
class Person {
private string name = "Alice";
public string GetName() {
return name;
}
}
var p = new Person();
Console.WriteLine(p.GetName());