A baseball Linq-er
- Posted: Jan 08, 2007 at 8:01 AM
- 10 Views
Derek Slager wrote an example to show off LINQ, language integrated query, using baseball. For those who don't really follow sports, baseball has a state for literally everything. While in Wrigley Field, I've heard people rattle off "He can bat a .405 against a left handed pitcher on every other thursday of the month."
Now what is linq? Here is a quick example. For more information, visit MSDN's LINQ project.
1: WriteRankedList(from game in games
2: group game by game.WinningPitcher into g
3: orderby g.Count() descending
4: select g);
Now I just need to find where to score a hotdog in the middle of Winter.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?