相关疑难解决方法(0)

如何在C#.NET文档中添加换行符

这应该更容易...

我想在我的代码中为XML文档添加"编码"换行符

/// <summary>
/// Get a human-readable variant of the SQL WHERE statement of the search element. &lt;br/&gt;
/// Rather than return SQL, this method returns a string with icon-tokens, which 
/// could be used to represent the search in a condensed pictogram format.
/// </summary>
Run Code Online (Sandbox Code Playgroud)

如您所见,我找到了一些答案,证明添加了<和>括号.有趣的是,好的'ol <br />换行符不会在Intellisense弹出窗口中创建换行符.

我发现这很烦人......

有什么建议?

.net c# xml-documentation

180
推荐指数
5
解决办法
6万
查看次数

为Intellisense的注释添加换行符

有没有人知道如何在摘要注释中插入换行符,以便在Intellisense文档中反映换行符?

为了澄清,假设代码文档..

/// <summary>
/// Some text documentation
///  - a line break - 
/// Some more documentation
/// </summary>
public void SomeMethod() { }
Run Code Online (Sandbox Code Playgroud)

因此,当使用此方法时,Intellisense提供了这样格式化的方法的摘要:

一些文字文件

更多文档

(注意 - 'para'标签不会创建空换行符 - 我已经尝试过了!)

.net intellisense intellisense-documentati

77
推荐指数
4
解决办法
3万
查看次数

C#中的XML多行注释 - 我做错了什么?

根据这篇文章,可以获得多行XML注释 - 而不是使用///,使用/** */.这是我对多行注释的解释,以及我想要发生的事情:

/**
 * <summary>
 * this comment is on line 1 in the tooltip
 * this comment is on line 2 in the tooltip
 * </summary>
 */
Run Code Online (Sandbox Code Playgroud)

但是,当我使用这个表单时,当我将鼠标悬停在我的代码中时弹出的工具提示是单行的,即它看起来就像我写了这样的评论:

/// <summary>
/// this comment is on line 1 in the tooltip
/// this comment is on line 2 in the tooltip
/// </summary>
Run Code Online (Sandbox Code Playgroud)

这种行为实际上是否仍然可以在VS2008中使用?

编辑

gabe指出我误解了"多线"意味着什么,我实际上需要使用<para><br>获得我想要的效果.我继续使用,<br>因为我想控制断线发生的位置,即

/// <summary>
/// this comment is on line 1 in …
Run Code Online (Sandbox Code Playgroud)

c# comments multiline xml-comments visual-studio-2008

26
推荐指数
2
解决办法
1万
查看次数

如何写方法的描述

可能重复:
C#中的XML多行注释 - 我做错了什么?
VB.Net和Visual Studio Intellisense中的多行XML注释

我想对我的方法有一些描述

/// <summary> 
/// Perform a divide by b
///      e.g a = 1, b = 2
/// will return 0, since (1/2) = 0.5
/// </summary>
/// <returns>int value</returns>
public static int Div(int a, int b)
{


    return (a / b);
}
Run Code Online (Sandbox Code Playgroud)

我希望描述以我输入的相同格式显示..但是,这些文本将始终显示在oneline上.

是否有任何标签,我可以用来让视觉工作室包括所有这些空间和新线?

谢谢

c# .net-4.0 visual-studio-2010

9
推荐指数
1
解决办法
2万
查看次数