c# - VB.NET 中代码注释和 XML 注释的不同颜色

标签 c# vb.net visual-studio visual-studio-2005

我注意到在 C# 中,通过更改工具 > 选项 > 环境 > 字体和颜色 > 显示项中的设置,XML 注释和代码注释可以有不同的颜色: - 注释:控制代码注释 - XML 注释:控制 XML 注释

这在 C# 中运行良好

///<summary>This XML comment is green</summary>

//This code comment is red

但不是在 VB.NET 中

'''<summary>This XML comment appears red too even though it's configured as green</summary>

'This code comment is red

有办法解决这个问题吗?

最佳答案

VB 和 C# 的着色设置因语言而异。

这是两者之间相应设置的部分列表:

C#                 VB
Comment            Comment
XML Doc Attribute  VB XML Attribute
XML Doc Comment    VB XML Comment (the second one)
XML Doc Tag        VB XML Doc Tag

关于c# - VB.NET 中代码注释和 XML 注释的不同颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7553746/

相关文章:

c++ - 如何从 Visual Basic 2010 调用 C++ dll 文件

c++ - 我可以获取控制台窗口中所选文本的位置(C++)吗?

asp.net - 删除 IIS Express 中错误创建的虚拟目录

visual-studio - 无法从 Visual Studio 向项目添加基本类

c# - 如何使用 IronPython 中的包调用 Python 脚本?

c# - 使用 agility pack C# 处理 cookie 和 header

vb.net - Html.ActionLink 作为按钮而不是超链接

vb.net - 断开 iTunes COM

c# - 将应用程序移植到 Citrix 时需要了解哪些基础知识?

c# - 在 C# 8 中检查 null 并立即分配给变量