Despite the fact this deals with webservices I believe it is a VB question.
I am working on a test application that passes data to a webservice.
The webservices takes a variable type that is defined below:
Public Class Variable
Inherits MarshalByRefObject
'<remarks/>
Public strVariableName As String
'<remarks/>
Public objVariableValue() As Object
End Class
My code is as follows
Dim varList(2) as Variable
varList(0) = New Variable
varList(0).strVariableName = "Name"
varList(0).objVariableValue = New Object <- Error Occurs Here
varList(0).objVariableValue(0) = name
If I use the above code I get a "Specified Cast is not Valid" error.
If I code it this way...
Dim varList(2) as Variable
varList(0) = New Variable
varList(0).strVariableName = "Name"
varList(0).objVariableValue(0) = name <-- Error Occurs here
I get "Object reference not set to an instance of an object." as my
error. What am I missing?