I read a book and saw the following code example:
public class Man { public string Name; public override string ToString() => Name; } ... Man p = new Man { Name = "Piter" }; Console.WriteLine (p); //Piter It is not clear what does ToString do with it at all, and why do we print the name by simply invoking an instance without specifying a field?
ToString. - Igorp.nameand notp.ToSrting()), I will output exactly what was defined insidepublic override string ToString() => Name;? - Nikolay