Method inside Razor View

@functions{
    public bool isEven(int number)
    {
        return number % 2 == 0 ? true : false;
    }
}

@isEven(18);

No comments:

Post a Comment