visual studio tutorial - Precondition that throws a specific Exception - microsoft studio - microsoft visual



Precondition that throws a specific Exception

using System.Diagnostics.Contracts;

public int DivideNumbers(int numerator, int denominator)
{
    Contract.Requires<ArgumentOutOfRangeException>(denominator != 0);

    return numerator / denominator;
}
click below button to copy the code. By Visual studio tutorial team

Related Searches to visual studio tutorial - Precondition that throws a specific Exception