Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Storing value to property array
Message
De
21/07/2011 06:23:05
 
 
À
21/07/2011 06:16:34
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Application:
Desktop
Divers
Thread ID:
01518733
Message ID:
01518737
Vues:
33
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform