C Sharp (C#) - Classes and Objects
What will be the output of the following code?
class Person {
public string Name;
public Person(string Name) {
this.Name = Name;
}
public void PrintName() {
Console.WriteLine(this.Name);
}
}
var p = new Person("Alice");
p.PrintName();