I have created a class, which contain a string, byte array and a datetime variables.
also created a queue for for this class,
I want to sort the queue per the datetime which is inside the class
what is the best way to do that to compelte the method sortQueue?
public class DataToPassOn
{
public DateTime dt;
public byte [] Data;
public string ComName;
public DataToPassOn(int length)
{
dt = new DateTime ();
Data = new byte[length];
ComName="";
}
}
public class sorting
{
private Queue<DataToPassOn> _QdataToPassOn;
public sorting ()
{
_QdataToPassOn = new Queue<DataToPassOn>();
}
public void sortQueue ()
{
}
}