public object[] StringToArray(string input, string separator, Type type)
{
string[] stringList = input.Split(separator.ToCharArray(),StringSplitOptions.RemoveEmptyEntries);
object[] list = new object[stringList.Length];
for (int i = 0; i < stringList.Length; i++)
{
list[i] = Convert.ChangeType(stringList[i], type);
}
return list;
}
Thursday, July 23, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment