Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Anonymous Types in Visual Studio 2008

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
8,262
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 3, 2007

http://blog.dmbcllc.com Object initialization allows us to instantiate an object and assign properties all in "one line of code." Anonymous types takes this to the next step by allowing us to just completely skip the step where we declare the class. This video explains Anonymous types in CSharp and VB.NET

Category:

People & Blogs

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (davidmbush)

  • WTH is with the read-only ppts in C#? Are they just being cruel for cruelties sake or is there some weird reasoning behind that.

  • ppts?

  • Yes, sorry, Properties.

    Enjoy your videos.

  • Nothing wrong with read only properties in C#

  • No, I mean why are they read only for anonymous types? Is there a reason for that?

  • Oh, right.

    No idea.

Top Comments

  • Oh no, curly braces in Visual Basic!

see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • I think anonymous types use a compiler determined variable. This variable is not known until the code is compiled so how can you access it? If you can't access it, you can't change it, thereby making anonymous types read-only.

  • The F# types they are based on are immutable. In F# this is by design as it fits with the functional programming paradigm. In C# and VB and other imperative languages, this seems like an arbitrary restriction.

  • Thank you for this tutorial. Great lesson.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more