I would like to sort my list with the date property.
This is my custom class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Test.Web
{
public class cTag
{
public int id { get; set; }
public int regnumber { get; set; }
public string date { get; set; }
}
}
An this is the List that I want to sort:
List<cTag> Week = new List<cTag>();
I want to sort the List by the date property of the cTag class.
The date is in the format dd.MM.yyyy.
I read something about the IComparable interface, but I don’t know how to use it.
One way to do this is with a
delegate