Why doesn't VB.NET 9 have Automatic Properties like C# 3??

Posted by Chris Pietschmann on Stack Overflow See other posts from Stack Overflow or by Chris Pietschmann
Published on 2008-09-23T17:04:22Z Indexed on 2010/03/27 20:13 UTC
Read the original article Hit count: 339

Would having a nice little feature that makes it quicker to write code like Automatic Properties fit very nicely with the mantra of VB.NET?

Something like this would work perfect:

Public Property FirstName() As String
    Get
    Set
End Property

UPDATE: VB.NET 10 (coming with Visual Studio 2010 and .NET 4.0) will have Automatic Properties. Here's a link that shows a little info about the feature: http://geekswithblogs.net/DarrenFieldhouse/archive/2008/12/01/new-features-in-vb.net-10-.net-4.0.aspx

In VB.NET 10 Automatic Properties will be defines like this:

Public Property CustomerID As Integer

© Stack Overflow or respective owner

Related posts about c#

Related posts about vb.net