c# - c和代码标签之间的区别

标签 c# xml-comments

在C#的xml注释中,下面的标签有什么区别?

1. <c> 
2. <code>

最佳答案

假设您正在谈论 tags in xml comments , c 就像 StackOverflow 中的反引号,而 code 更像是代码块。

/// <summary>
/// This is the <c>SomeMethod</c> method of the <c>Program</c> class.
/// </summary>
/// <param name="s">A string.</param>
/// <example>
/// You can use this method like this:
/// <code>
/// string x = SomeMethod("foobar");
/// Console.WriteLine(x);
/// </code>
/// </example>
static string SomeMethod(string s){
    throw new NotImplementedException();
} 

关于c# - c和代码标签之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7954063/

相关文章:

c# - 为什么 Console.In.ReadLineAsync 会阻塞?

c# - C# 中的 XML 注释有什么用?

c# - 在c#中格式化日期

c# - 同一 View WPF MVVM 中多个 ViewModel 的绑定(bind)

c# - 需要将信息保存在对象中的 C# 类方法

visual-studio - 成员和 XML 命令之后的 Doxygen 文档

c# - 检查 xml 注释中的异常处理?

xml - 如何在 XML 标记内注释属性?

c# - 获取 .Net XML 文档以返回字典的特定类型

c# - 如何将词典与 SpeechSynthesizer 一起使用?