Know a good article or link that we're missing? Submit it!
*/
*/

The Official Programmer's Heaven Blog

Theme Graphic
Theme Graphic

The Official Programmer's Heaven Blog

The blog where the Programmer's Heaven team post stuff.

Subscribe

Author

Often knowledgable, sometimes wise, occasionally funny. The Programmer's Heaven blog team post about a whole range of topics, from practical advice on concurrency control to introductions to lesser known concepts such as functional programming. Don't forget to comment on the posts and let them know what you think, like and hate!

Archive

Tags


Delete Blog
Posted on Tuesday, April 01, 2008 at 7:17 AM

When Linq and ref Parameters Meet

It's fair to say that I'm a pretty heavy user of Linq. You'll find uses of it scattered across my code, from the obvious (using DLinq to query a database) to the slightly more exotic (writing queries over collections obtained from classes in System.Reflection). Linq often allows you to express a problem very neatly, resulting in compact, readable code. It also factors out the application of operations and leaves you to worry about the operations themselves, likely decreasing bugs.

Fixing A Bug

Today I ran across some code that took a parameter, then used it in a Linq query. Omitting the clutter, it looked something like this:
public void Lookup(string URL, ref int ID, ref int Status)
{
    // ...stuff...
    var Result = from D in DB.Datas
                 where D.URL == URL
                 select D;
    // ...more stuff...
}
...
Comments: 3 Tags: .NET, C# 3.0, Linq

Posted on Wednesday, December 12, 2007 at 5:12 AM

C# 3.0 Part 4: Linq

The final part of our C# 3.0 series is about Linq - Language Integrated Query.

Learn:
  • What declarative programming is
  • How to write Linq queries
  • How to use ordering, joins, groups and query continuations
  • What DLinq and XLinq are
Read it now!
Comments: 0 Tags: C# 3.0, Linq


corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings