Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Redeclaring things
Message
De
11/02/2011 11:53:43
 
 
À
11/02/2011 11:48:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01499783
Message ID:
01499787
Vues:
29
>>Hi
>>
>>if I have
>>
>>Dim s As Series = setupSeries(modelName)
>>
>>then in a loop I want to ditch that s and set up a new one whats the best way of doing that
>>
>>if I just repeat the code I get
>>
>>
>>Error 1 Variable 's' hides a variable in an enclosing block.
>>
>>so what should I be doing.
>
>Not declaring the type?:
Dim s As Integer = 20
>For xx As Integer = 1 To 100
>       s = 5  'Works
>       Dim s As Anything 'Won't
>Next
Thanks Viv

I'd just realised that (honestly) :-)

its been a long week is my only excuse.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform