示例#1
0
 static void Main()
 {
     int[] arr = new int[] { 2, 4, 6, 8, 9, 10, 7, 8, 9, 1 };
     foreach (var item in arr)
     {
         Console.Write(" " + item);
     }
     //UseGenericList<int[]>.Insert(arr, 3);
     //UseGenericList<int[]>.Remove(2);
     UseGenericList <int[]> .Clear();
 }
示例#2
0
 public static void FindElement <T>(T element, UseGenericList <T> elements)
 {
     for (int i = 0; i < elements.Count; i++)
     {
         if (elements[i].Equals(element))
         {
             Console.WriteLine("the element is at index: {0}", i);
         }
         return;
     }
     Console.WriteLine("Not found!");
 }