Hi Everybody,
I've been working with webservices. But I keep stumbling on the same error.
An unhandled exception of type 'System.NullRef erenceException '
Additional information: Object reference not set to an instance of an object.
This is my piece of code
When I get the error, the keyTagHash.Add line highlights.
Can anyone help me please?
THanks
I've been working with webservices. But I keep stumbling on the same error.
An unhandled exception of type 'System.NullRef erenceException '
Additional information: Object reference not set to an instance of an object.
This is my piece of code
Code:
getKeyTags _keyTags = new getKeyTags();
_keyTags.login = login;
KeyTagBean[] keyTags = null;
lock (wService)
{
keyTags = wService.getKeyTags(_keyTags);
}
Hashtable keyTagHash = new Hashtable();
foreach (KeyTagBean bean in keyTags)
{
keyTagHash.Add(bean.keyTagID, bean);
}
dataGridView1.DataSource = keyTagHash;
Can anyone help me please?
THanks
Comment