Visual Studio formatting Strings as VB.NET code

醉酒当歌 提交于 2020-01-07 02:50:18

问题


I have some MySQL written as String in my VB.NET application. Sometimes Visual Studio (2015 Community) changes the format of some parts of the string that it thinks its a keyword.

Example.:

Command.CommandText = "DROP TABLE IF EXISTS `table_name`"

is changed to:

Command.CommandText = "DROP TABLE If EXISTS `table_name`"

In this case it is just annoing and not harmful, but I can think of situations where this could cause some problems. Case sensitive string comparison, for instance. Another problem is that distracts from the real modifications when using a version control.

To me its seems like a bug in the current release. For now how can I avoid this?

来源:https://stackoverflow.com/questions/40114833/visual-studio-formatting-strings-as-vb-net-code

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