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

爱⌒轻易说出口 提交于 2019-12-05 00:52:29

One reason many features get delayed in VB is that the development structure is much different than in C# and additionally, that often more thought goes into details. The same seems to be true in this case, as suggested by Paul Vick's post on the matter. This is unfortunate because it means a delay in many cases (automatic properties, iterator methods, multiline lambdas, to name but a few) but on the other hand, the VB developers usually get a much more mature feature in the long run (looking at the discussion, this will be especially true for iterator methods).

So, long story short: VB 10 will (hopefully!) see automatic properties.

It also wasn't as big of a pain point in vb.net, since visual studio will automatically create 90% of the skeleton code of a property for you whereas with C# you used to have to type it all out.

If you want to do properties a little quicker, try code snippets. Type: Property and just after typing the "y", press the Tab key :-).

I realize this doesn't answer the particular question, but does give you what the VB team provided...

I know this post is old so you may already know but VB is getting Auto Properties in next version of VS.

Based on response to feedback and Channel9.

C# and VB.NET don't exactly line up on new features in their first versions. Usually, by the next version C# catches up with some VB.NET features and vice versa. I kind of like literal XML from VB.NET, and hoping they add that to C#.

There's no particular reason really. It's been always been the case that even when VB.NET and C# are touted to be equally powerful (and to be fair, they are) their syntaxes and some of the structures sometimes differ. You have two different development teams working on the languages, so it's something you can expect to happen.

automatic properties are not necessary in vb the concession one makes by using an automatic property is that you can not modify the Get and Set.

If you dont require those, just make a public data field.

VB has had automatic properties for years. They just called them something else.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!