gpt4 book ai didi

c# - 当参数名称不匹配时,XML 方法文档不会产生警告

转载 作者:太空宇宙 更新时间:2023-11-03 23:15:03 27 4
gpt4 key购买 nike

在 VB 中,如果方法参数名称与 XML 文档不匹配,我将收到警告:

enter image description here

XML comment parameter 'arg' does not match a parameter on the corresponding 'sub' statement. XML comment will be ignored.

在 C# 中,我没有收到警告:

enter image description here

我知道如果我做对了并使用“重构”上下文菜单重命名了参数,它也会重命名 XML 文档,但假设我并不总是以正确的方式做事。

为什么会这样?是否有我可以打开的设置来获取这些警告?

最佳答案

如果您在项目属性中启用 XML 文档文件:

enter image description here

您将收到警告:

enter image description here

关于c# - 当参数名称不匹配时,XML 方法文档不会产生警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37484515/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com