var firstName = name ?? throw new ArgumentException("Mandatory parameter", nameof(name),);
public Exception GetException(object instance)
{
return (instance == null) ? new ArgumentNullException() : new ArgumentException();
}
public void Main()
{
object something = null;
throw GetException(something);
}