简体   繁体   English

VB.NET VS2012不会自动完成“公共财产”

[英]VB.NET VS2012 does not autocomplete “Public Property”

I do remember that an earlier version of VS autocompleted the rest of the property function when I typed something like 我确实记得当我输入类似VS的早期版本时,它会自动完成其余的属性功能

"Public Property ImagesImported() As Boolean"

The IDE automatically added the Setter and Getter. IDE自动添加了Setter和Getter。

However, VS2012 does not. 但是,VS2012没有。 When I press enter at the end of this line, nothing happens. 当我按此行末尾的Enter键时,什么也没发生。 I have to type the getters and setter myself. 我必须自己键入getter和setter。

Did I do anything wrong? 我做错了吗? Thank you! 谢谢!

This is an intentional design change. 这是有意的设计更改。 What you are seeing here is an auto-implemented property. 您在这里看到的是一个自动实现的属性。 It is a fully functional property complete with a backing field. 它是具有后备字段的完整功能属性。 The VB.Net IDE prefers this form because it's complete and more succinct VB.Net IDE偏爱这种形式,因为它完整且简洁

If you want to get the code spit for full properties you need to drop down to the next line, type Get followed by Enter 如果要获取完整属性的代码,则需要下拉至下一行,键入Get然后按Enter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM