Ok, I have a simple IEnumerable<HtmlString> things
and I want to divide it up into four equal groups.
var quarter = things.OrderBy(t => t.Foo).Count() / 4;
should do the trick, but instead I get this funkiness:
Server Error in '/' Application. At least one object must implement IComparable. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: At least one object must implement IComparable.
Line 36: int quarter = things.OrderBy(t => t.Foo).Count() / 4;
Anyone know what the heck is going on here? Why would I need to implement IComparable to get a simple count?