首页 > 代码库 > 将字符串数组转换成整形数组

将字符串数组转换成整形数组

/// <summary>
/// 将字符串数组转换成整形数组
/// </summary>
/// <param name="Content"></param>
/// <returns></returns>
protected static int[] ToIntArray(string[] Content)
{
int[] c = new int[Content.Length];
for (int i = 0; i < Content.Length; i++)
{
c[i] = Convert.ToInt32(Content[i].ToString());
}
return c;
}