>I have a collection of objects called Groups which have a Sequence property. I'd like to get back the highest sequence. How can I do
>this with Linq?
>
>I tried this, but it doesn't recognize Max:
>
>
>var group = Manager.Root.Groups.Max(x => x.Sequence);
>
>
>I thought this was it
http://msdn.microsoft.com/en-us/library/system.linq.enumerable.max.aspx>
>but I guess I'm wrong.
I don't have intellisense right now, but I think you want OrderByDescending(x => x.Sequence) coupled with Take(1).