Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking to resolve a warning
Message
De
16/12/2005 20:00:30
 
 
À
16/12/2005 19:54:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01078852
Message ID:
01078877
Vues:
9
>While I am not sure how to solve it, let me comment on why the error appears. The FOR EACH is executed once for each file, but there is no guarantee that there is any. The TRY part might have other instructions, outside the FOR EACH loop, that may trigger the CATCH part. In your code, there happen to be no more commands, but the compiler probably doesn't notice that.
>
>One possibility would be to put the TRY/CATCH within the FOR EACH loop, instead of the other way round, but you must decide for yourself whether that fits into your logic.
>
>(BTW, I believe that C# is much stricter with the "definite assignment rule", and the equivalent of your code would not compile at all.)

Thanks, this has resolved the issue.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform