📅  最后修改于: 2022-03-11 14:48:39.347000             🧑  作者: Mango
public Exception GetException(object instance)
{
return (instance == null) ? new ArgumentNullException() : new ArgumentException();
}
public void Main()
{
object something = null;
throw GetException(something);
}