using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace ConsoleApplication1
{class Program{static void Main(string[] args){GenericArray<int> intArray = new GenericArray<int>(5);//实例化一个泛型的数组for (int i = 0; i < 5; i++){intArray.SetItem(i, i * 5);Console.WriteLine(intArray.GetItem(i));}Console.WriteLine();//同样的方法用于字符串数组:GenericArray<char> charArray = new GenericArray<char>(5);for (int i = 0; i < 5; i++){charArray.SetItem(i, (char)(i +97));Console.WriteLine(charArray.GetItem(i));}}public class GenericArray<T>{private T[] array;//构造函数public GenericArr