Attempting to understand Constructors with parameters.
Would appreciate if someone could explain how this code is being read to output "David". Attempting to learn constructors w/ parameters. Thanks! using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { class Person { private int age; private string name; public Person(string nm) { name = nm; } public string getName() { return name; } } static void Main(string[] args) { Person p = new Person("David"); Console.WriteLine(p.getName()); } } }