Sort a List of custom objects
fakta.AddRange(retur.Fakta);
FaktaCompare c = new FaktaCompare();
fakta.Sort(c);
public class FaktaCompare : IComparer<FaktaEntitet>
{
#region IComparer<FaktaEntitet> Members
public int Compare(FaktaEntitet x, FaktaEntitet y)
{
return String.Compare(x.Key, y.Key);
}
Posted via email from Henris blogg
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment