Convert Generic List to Array

Here is a method to convert a generic list to an Array.

public static T[] ConvertListToArray<T>(List<T> theList)
{
try
{
if (theList == null)
{
return null;
}

T[] theArray = new T[theList.Count];

for (int i = 0; i < theArray.Length; i++)
{
theArray[i] = theList[i];
}

return theArray;
}
catch (Exception ex)
{
throw ;
}
}