嗨,我在下面的代码中注释的行出现错误,object reference not set to an instance of an object
有没有办法解决它?
private void button20_Click(object sender, EventArgs e)
{
string blabla1 = string.Format("http://localhost:8000/Service/AuthenticateUser/{0}/{1}", textBox30.Text, textBox31.Text);
XDocument xDoc = XDocument.Load(blabla1);
xDoc.Element("StudentID").Value.ToList(); // object reference not set to an instance of an object?
dataGridView12.DataSource = xDoc;
}