我有一個自定義Exception構造,我想拋出自定義異常使用函數而不是使用throw new ExceptionName("msg")。 我讀了Best practices for exceptions,我成功地使用了VB而不是C#。 這是我的自定義構建: [Serializable()]
public class ArtCoreExceptions : Exception
{
namespace Rextester
{
public class BaseException : Exception
{
public BaseException() { }
}
public class Program
{
public static void MethodA(BaseException e)