|
♂丶Elvis゛() 14:38:23
string str = textBox1.Text;
string[] strs = str.Split(',');
如何将下面的字符串数组转化成 整形数组?
♂[电工]Lucker() 14:39:32
/// <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 = Convert.ToInt32(Content.ToString());
}
return c;
}
♂sonyvspsp() 14:39:37
Array.
♂[电工]Lucker() 14:39:38
网上COPY的.
♂sonyvspsp() 14:39:51
微软有方法
♂丶Elvis゛() 14:40:06
谢谢 ,
|
|