在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/