こんにちは私は以下のコードにコメントされている行にエラーが表示されますobject reference not set to an instance of an object
これを修正する方法はありますか? xDoc.Element("StudentID")
が見つからない場合はオブジェクト参照がオブジェクトxdocumentのインスタンスに設定されていません
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;
}
を返すようにしようと、私たちはあなたのためにあなたの全体のプロジェクトをやっているの? ;) – musefan
xmlを添付できますか? –
可能であればxmlを表示 –