Sorting your C# objects with LINQ
Last modified: 09/01/2012
Jan 09
Suppose you create a Box class with some properties.
-
-
class Box
-
{
-
public string Name
-
{ get; set; }
-
-
public string Color
-
{ get; set; }
-
-
public string Label
-
{ get; set; }
-
-
public DateTime CreatedAt
-
{ get; set; }
-
-
public override string ToString()
-
{
-
return string.Format("[Name: {0}; Color: {1}; Label: {2}; CreatedAt: {3}]",
-
Name, Color, Label, CreatedAt);
-
}
-
}
[?]
RSS
Comment Rating