我有一个在命名空间下引发异常的方法:MyApp.Domain。我在命名空间下有一些自定义异常:MyApp.Domain.Exceptions。所以我所拥有的是这样的:
using MyApp.Domain.Exceptions
using System;
namespace MyApp.Domain
{
public class SomeClass
{
///<summary>This method does some stuff</summary>
///<exception cref="MyCustomExeption">MyCustomException if x</exception>
///<exception cref="Exception">GenericException if y</exception>
public void DoStuff(){
//Does stuff
}
}
}
我正在通过智能感知获取摘要,但也不例外。我是否必须使用包含并创建外部 xml 注释文件,因为它们位于不同的命名空间下?这两个异常都没有出现在 intellisense、mycustomexception 或 system.exception 中。
谢谢。
实际上Exception
一旦您输入完整的方法名称然后将鼠标悬停在上面,标签就会可见。
如果您想在开始输入方法名称后立即显示异常,则必须在摘要标记中提供异常,并用<para>
/// <summary>
/// this is my method for date convert
/// <para>Exception:</para>
/// Exception - this will appear as soon as you started typing the method name and method over.
/// </summary>
/// <exception cref="Exception"></exception>
希望它能明确你想要什么。
当用户开始输入方法名称时,即可显示您想要的任何内容。您必须仅在摘要标签内提供。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)