Comment 1 for bug 958770

Revision history for this message
Vitalii Maklai (vmcl) wrote :

I would prefer something like:

public static TException Throws<TException, T>(Func<T> action)
    where TException : Exception
{
    return Assert.Throws<TException>(() => { var v = action(); });
}