C# 字符串数组转换为整形数组

/// <summary>
/// 字符串数组转换整形数组
/// </summary>
/// <param name="Content">字符串数组</param>
/// <returns></returns>
public 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;
}

 

posted @ 2016-02-25 17:28  sofootball  阅读(3831)  评论(0编辑  收藏  举报