Visual studio 2008 如何使VS2008中的Xml注释与Intellisense一起用于枚举?
似乎并不是所有的Xml注释都显示在Intellisense中,但也许我做得不对?无论如何,我试图使枚举列表中的单个枚举成员以intellisense显示,并带有描述性文本。例如,在String.Split方法中,第三个重载将StringSplitOptions枚举作为参数,如下所示: 在我尝试过的其他事情中:Visual studio 2008 如何使VS2008中的Xml注释与Intellisense一起用于枚举?,visual-studio-2008,intellisense,xml-comments,Visual Studio 2008,Intellisense,Xml Comments,似乎并不是所有的Xml注释都显示在Intellisense中,但也许我做得不对?无论如何,我试图使枚举列表中的单个枚举成员以intellisense显示,并带有描述性文本。例如,在String.Split方法中,第三个重载将StringSplitOptions枚举作为参数,如下所示: 在我尝试过的其他事情中: public enum ErrorTypeEnum { /// <summary>The process could not identify an agency &l
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
...
public enum ErrorTypeEnum
{
///该程序无法确定一个机构
BatchAgencyIdentification//无法识别代理
///批处理文档类别无效。
,BatchInvalidBatDocCatCode//除“C”之外的任何内容
///该批没有文档。
,BatchHasNodeDocuments//无文档节点
...
上面的示例确实有效,但仅适用于第一个枚举,而不适用于任何其他枚举
我做错了什么?你的想法是对的,但是你的逗号位置搞错了。要显示单个枚举,请将它们放在逗号之后,而不是之前。在这些情况下,你可能希望将逗号放在每行的末尾,而不是开头 e、 g
public enum ErrorTypeEnum
{
///该程序无法确定一个机构
BatchAgencyIdentification,//无法识别代理
///批处理文档类别无效。
BatchInvalidBatDocCatCode,//除“C”之外的任何内容
///该批没有文档。
BatchHasNodeDocuments//无文档节点
...
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
...