gpt4 book ai didi

c# - 我可以使用 C# 文档标记引用重载方法吗?

转载 作者:行者123 更新时间:2023-11-30 21:21:59 25 4
gpt4 key购买 nike

在这个特定的代码示例中,我想引用 C# documentation 中的第二个重载方法 (int n)标签:

/// <summary>
/// The method to pass an integer to is <see cref="DoSomething">
/// </summary>

void DoSomething() {
}
void DoSomething(int n) {
}
void DoSomething(string str) {
}

但是如何呢?

最佳答案

当 ReSharper 帮助我完成 cref 属性时,它包括存在重载时的参数类型(即 DoSomething(int))。我假设这是执行此操作的有效方法。

关于c# - 我可以使用 C# 文档标记引用重载方法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2455341/

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