This is probably a really simple issue but i have search around and cant find an answer
I have a structure set up and am using a varaible in the structure called "type"
The array connected to the structure is called "data_Array()"
All i want to do is do a IndexOf or Substring with this but every time it crashes with "Object reference not set to an instance of an object."
Just cant understand why this does not work, i have msgboxed the "CurrentType" varaible and that shows up correctly so the array and structure works
Any help please, i need this built before the weekend
Thanks
likdaboo
I have a structure set up and am using a varaible in the structure called "type"
The array connected to the structure is called "data_Array()"
All i want to do is do a IndexOf or Substring with this but every time it crashes with "Object reference not set to an instance of an object."
VB.NET:
Dim CurrentType as String
For i = 1 to 10
CurrentType = data_array(i).type
if CurrentType.IndexOf("Main") <> -1 then 'Crashes on this line
MsgBox("It Found 'Main' ")
End If
Next
Just cant understand why this does not work, i have msgboxed the "CurrentType" varaible and that shows up correctly so the array and structure works
Any help please, i need this built before the weekend
Thanks
likdaboo