如何在VS 2008的工作XML注释与智能感知枚举?
-
20-09-2019 - |
题
看来,不是所有的XML-评论显示了在智能感知,但也许我没有做正确吗?无论如何,我想使它所以在枚举列表个人枚举成员用描述性文本智能感知显示出来。例如,在String.Split方法中,第三过载取StringSplitOptions枚举作为参数,如下所示:
替代文字http://www.freeimagehosting.net/uploads/a138d36615.jpg一>
在其他事情我已经试过:
public enum ErrorTypeEnum
{
/// <summary>The process could not identify an agency </summary>
BatchAgencyIdentification // Couldn't identify agency
/// <summary>The batch document category was invalid.</summary>
, BatchInvalidBatDocCatCode // Anything other than "C"
/// <summary>The batch has no documents.</summary>
, BatchHasNoDocuments // No document nodes
...
上面的例子的工作,但仅对于第一枚举,而不是任何其他
我在做什么错了?
解决方案
您已经有了正确的想法,但你的逗号位置被拧起来。为了让显示出来的个人枚举,而不是之前把它们放到逗号后。你可能想要把你的逗号在每行,而不是在这些情况下开始的结束。
e.g。
public enum ErrorTypeEnum
{
/// <summary>The process could not identify an agency </summary>
BatchAgencyIdentification, // Couldn't identify agency
/// <summary>The batch document category was invalid.</summary>
BatchInvalidBatDocCatCode, // Anything other than "C"
/// <summary>The batch has no documents.</summary>
BatchHasNoDocuments // No document nodes
...
不隶属于 StackOverflow