Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing value to property array
Message
From
21/07/2011 05:19:49
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Storing value to property array
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Application:
Desktop
Miscellaneous
Thread ID:
01518733
Message ID:
01518733
Views:
87
I am trying to upload some data to a WebService, I need to create an instance of an object and set it's properties.

The parent object has a .message property which is a one dimensional array of MessageObjects. I have successfully created my MessageObject but can't find out how to store it into the .message array I thought it should be ;

ParentObject.message(0) = New MessageObjectClass
ParentObject.message(0) = myBuiltMessage

But I get an error that ParentObject.Message(0) is "Object reference not set to an instance of an object."

Somehow I need to dimension the message() array or in some way instantiate an element, I am new to .Net and not dealt with property arrays before, how can I do this?


Gary.
Next
Reply
Map
View

Click here to load this message in the networking platform