True if number is in range - CSharp System

CSharp examples for System:Int32

Description

True if number is in range

Demo Code


using System.Text;
using System;/*from w w w  . j a  va2 s  .c  om*/

public class Main{
        /// <summary>
        /// True if number is in range
        /// </summary>
        /// <param name="min">number</param>
        /// <param name="i">lower</param>
        /// <param name="j">higher</param>
        /// <returns>True if number in range</returns>
        private static bool inRange(int min, int i, int j)
        {
            return min >= i && min <= j;
        }
}

Related Tutorials