VB.NET 换行更改
有谁知道我是否可以找到不再需要换行符 (_
) 的列表。到目前为止,我注意到参数列表和属性现在可以在没有换行符的情况下工作。
Does anyone know if I can find a list of where the line break (_
) is no longer required. So far I notice parameter lists and attributes now work without the line break char.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从技术上讲,它称为行继续字符。
这不是 .NET Framework 版本的功能,而是编译器的功能。第一个支持它的版本是 VB.NET 10,它包含在 Visual Studio 2010 中。
新功能已记录在 此处,包括一个很好的表格,列出了隐式延续的情况。
Technically speaking, it's called a line continuation character.
This is not a feature of the .NET Framework version, it's a feature of the compiler. The first version to support it is VB.NET 10, the one included with Visual Studio 2010.
The new feature is documented here, including a nice table listing where continuation is implicit.
可以换行的位置的规则没有改变。对于更高版本的编译器,您根本不再需要 _ 。
The rules for where you can break a line haven't changed. You just no longer need the _ at all with the later compilers.