Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Storing value to property array
Message
From
21/07/2011 06:23:05
 
 
To
21/07/2011 06:16:34
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Application:
Desktop
Miscellaneous
Thread ID:
01518733
Message ID:
01518737
Views:
32
>>>Dim Message As MessageObjectClass() = New MessageObjectClass(5)
>>>Message(0) = New MessageObjectClass
>
>Viv,
>
>I get an error on the first line with "Too many arguments to 'Public Sub New()'
>
>I have expanded the sample code to see if that help explain what I am doing;
>
>
>     Dim MyParentObject As New Webservice.ParentObjectClass = New Webservice.ParentObjectClass
>     Dim MyBuiltMessage As WebService.MessageClass = New WebService.MessageClass
>
>     MyBuiltMessage.Property1 = "Hello"
>     MyBuiltMessage.Property2 = 1
>
>     MyParentObject.message(0) = New WebService.MessageClass()    <-- Error occurs here.
>     MyParentObject.message(0) = MyBuiltMessage
>
Remove the brackets?
MyParentObject.message(0) = New WebService.MessageClass
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform