com.calitha.commons.IntegerList.Add C# (CSharp) Method

Add() public method

Adds an integer to a list.
public Add ( int value ) : int
value int The value that will be added.
return int
		public int Add(int value)
		{
			return list.Add(value);
		}
		

Usage Example

		/// <summary>
		/// Returns an IntegerList whose elements are copies of the specified value.
		/// </summary>
		/// <param name="value">The value to copy multiple times in the list.</param>
		/// <param name="count">The number of times value should be copied.</param>
		/// <returns>An IntegerList with count number of elements, all of which are copies of value.</returns>
		public static IntegerList Repeat(int value, int count)
		{
			IntegerList result = new IntegerList();
			for (int i=0; i < count; i++)
			{
				result.Add(value);
			}
			return result;
		}
All Usage Examples Of com.calitha.commons.IntegerList::Add