for (i = 0; i < count; i++)if (reg.IsMatch(num1[i])){num[i] = Convert.ToInt32(num1[i]);}else{ messagebox.show("要提示的错误!"); return;//跳出当前循环}
把你的代码全部贴出来try{ num[i] = Convert.ToInt32(num1[i]);}catch{}