How do I add a second item to order by with this? I want to order by a goalsScored element too.
var theteams =
(from teams in xdoc.Descendants("team")
orderby (int)teams.Element("points") descending
select
new Team(teams.Element("teamID").Value,
(int)teams.Element("points"))
).Take(3);
but thenby doesn't seem to slot in to this query.
var theteams =
(from teams in xdoc.Descendants("team")
orderby (int)teams.Element("points") descending, OtherField1, OtherField2
select new Team(teams.Element("teamID").Value,
(int)teams.Element("points"))).Take(3);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With