Collections Data Structure C#

//-----------------------------------------------------------------------
// 
//     Copyright (c) Pyramid Consulting. All rights reserved.
//  khoa.tran - 15-Dec-2007
// 
//-----------------------------------------------------------------------
using System;
using System.Collections;
using System.Text;
namespace Bamboo.Core.Common.Collection
{
    /// 
    /// Convert a IList to an array with a specific type.
    /// 

    /// 
    public class ArrayUtil
    {
        public delegate T ConvertMethod(object input);
        public static T[] ConvertListToArray(IList inputList, ConvertMethod method)
        {
            T[] ouput = null;
            if (inputList != null)
            {
                ouput = new T[inputList.Count];
                for (int i = 0; i < inputList.Count; i++)
                {
                    ouput[i] = method.Invoke(inputList[i]);
                }
            }
            return ouput;
        }
    }
}