static void Main(string[] args)
Container<int> task2 = new Container<int>();
Console.WriteLine("{0}", task2.GetCount());
static void Task1<T>(T z, T y, T c)
T[] massiv = { z, y, c };
Console.WriteLine(x + " ");
static void Task3<T>(T x) where T : IComparable<T>
int[] tk3 = { 1, 2, 3, 6, 5, 6 };
for (int i = 0; i < tk3.Length; i++)
int k = tk3[i].CompareTo(x);
Console.WriteLine("Количество совпадений - {0}", kol);
public void Print(int count)
for (int i = 0; i < count; i++)
Console.WriteLine("{0}", array[i]);
if (count == array.Length)
for (int i = 0; i <= count; i++)
Console.WriteLine("{0}", array[i]);
if (count < array.Length)
array[count + 1] = value;
for (int i = 0; i <= (count + 1); i++)
Console.WriteLine("{0}", array[i]);
class Train : IComparable<Train>
protected int number = 2;
public string distination;
public int CompareTo(Train other)
return number.CompareTo(other.number);