«« Next » « Previous
«« Next » « Previous

Link Details

You have the power. Login and vote now.
Link 81416 thumbnail

By mswatcher
via codeproject.com
Submitted: May 16 2008 / 23:24

C# 3.0 introduces a great new feature called Automatic Properties, and if you haven’t already read about them, I would encourage you to read Scott Guthrie's introductory post. As great as they are and as much time as they save, Automatic Properties have a serious drawback – you can’t set the default value of the property. Instead, the compiler will initialize value properties to 0, reference properties to null, and enum’s to the first member, and while this might work for some applications, it wasn’t working for mine.
  • 1
  • 0
  • 73
  • 2

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (0)