矩阵的输入问题
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace 矩阵输入
{
public class Class2
{
public static double[,] jz;
public double[,] SR(string richTextBox)
{
string tetmsg = richTextBox;
string[] strSum = tetmsg.Replace("\r\n", "@").Split('@');
int m = 0, n = 0;
int j = strSum.Length;
foreach (string g in strSum)
{
string[] h = Regex.Split(g, " ", RegexOptions.IgnoreCase);
int i = h.Length;
foreach (string l in h)
{
jz[m,n] = double.Parse(l);
n++;
}
m++;
}
return jz;
}
}
}
运行时,显示错误在这个里面,错误是“
未将对象引用设置到对象的实例。”望哪位大神帮帮忙,帮改一下