I want to combine a few string properties into a single string to make sorting and display easier. I was wondering if there was a way to do this without having to iterate through the collection or list of the class. Something like FullName in the below Person class.
public class Person
{
public string Last {get;set;}
public string First {get;set;}
public string FullName = Last + ", " + First {get;}
}
Update your class like so:
Additional to your question, I would also recommend implementing an override of the
ToString()method (your question mentions making display easier) as most UI technologies will use this as a default way of displaying an object.