I have a class that looks like this:
class Record
{
public string host { get; set; }
public string type { get; set; }
public string name { get; set; }
public string RunAsUser { get; set; }
public string Status { get; set; }
public string StartMode { get; set; }
}
And a list of this class:
List<Record> Records = new List<Record>();
This list contains a number of entries. How can I sort this list on the basis of Record.host (alphabetically) ?
Is there a built-in function, or would I need to write my own? If so, could someone point me in the right direction by perhaps giving me some pseudo-code?
You can sort them using Linq if you just need to iterate them in sorted order.
Otherwise, you could call:
To permanently sort the list.