DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

5
kicks
submitted by johnrudy 2 months, 29 days ago

codeheaven.info — Brief rant about C#'s var keyword. Short version: Aside from anonymous types ... what's the big deal?

Add a comment 1 comment | category: | Views: 24 | Get KickIt image code
tags: , | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
I couldn't comment in your blog, so I'll do it in here:

I think the var was put in C# 3.0 primarily to support LINQ-queries that return anonymous types. In LINQ you can return any kind of objects with variable amount of columns or properties (defined in the select-part).

This ScottGu's article explains it well from the LINQ-perspective, too:
http://weblogs.asp.net/scottgu/archive/2007/05/15/new-orcas-language-feature-anonymous-types.aspx
posted by Jemm Jemm 2 months, 29 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge