I've been working with webservices. But I keep stumbling on the same error.
An unhandled exception of type 'System.NullReferenceException'
Additional information: Object reference not set to an instance of an object.
This is my piece of code
Expand|Select|Wrap|Line Numbers
- 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