CyrusBuilt.MonoPi.BitSet.CheckRange C# (CSharp) Method

CheckRange() private static method

Checks to see if the specified "from" index and "to" index is a valid range of bit indices.
/// is less than zero - or - /// is less than zero - or - /// is greater than . ///
private static CheckRange ( Int32 fromIndex, Int32 toIndex ) : void
fromIndex System.Int32 /// The starting index. ///
toIndex System.Int32 /// The ending index. ///
return void
		private static void CheckRange(Int32 fromIndex, Int32 toIndex) {
			if (fromIndex < 0) {
				throw new IndexOutOfRangeException("fromIndex cannot be less than zero.");
			}

			if (toIndex < 0) {
				throw new IndexOutOfRangeException("toIndex cannot be less than zero.");
			}

			if (fromIndex > toIndex) {
				throw new IndexOutOfRangeException("fromIndex cannot be greater than toIndex.");
			}
		}