public class BatchProcess
{
public string process { get; set; }
public DateTime runtime { get; set; }
public bool running { get; set; }
}
So I have a list of these guys – List<BatchProcess> list.
How would I sort based one each of those columns? I’ve heard I can do it with LINQ but I’m so bad with LINQ. How would that look?
Thanks.
You could sort by runtime, for example, via:
If you wanted to sort by “process” in descending order, you can use: