I need to make ascending sort of generic List. Here is my generic type:
public class ContainerData
{
private Point pnt;
private Size size;
private Double Area;
private Contour<Point> contour;
public ContainerData()
{ }
public ContainerData(ContainerData containerData)
{
this.pnt=containerData.pnt;
this.size=containerData.size;
this.Area=containerData.Area;
this.contour = containerData.contour;
}
public Point pointProperty
{
get
{return pnt;}
set
{pnt = value;}
}
public Size sizeProperty
{
get
{return size;}
set
{size = value;}
}
public Double AreaProperty
{
get
{return Area;}
set
{Area = value;}
}
public Contour<Point> ContourProperty
{
get
{return contour;}
set
{ contour = value; }
}
}
The ascending sorting have to be made under the value of X coordinate of th Point type.
Here is the class member that sholud be sorted:
private List<ContainerData> dataOfPreviusImage;
Any idea how can I implement it?
Thank you in advance.