Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Method overload requires Public declaration
Message
De
08/05/2011 16:23:44
 
 
À
08/05/2011 15:36:53
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01509881
Message ID:
01510026
Vues:
39
>>It may or may not be valid code. For example loRow("NoMember") in the example above is of type 'object' - which may or may not be convertible to an integer. If you want the compiler to use loRow("NoMember") as an int then, with Option Strict On, you need to explicitly cast:
If CInt(r("ColumnA")) > 0 Then..
Essentially, the compiler is pointing out that the code you have used may not work - if you know otherwise then it's up to you to cast.....
>
>Ok, so as I have this approach everywhere in every project, I don't see how I can switch that option ON for now.

You're right - maybe too much work to retrofit existing 'Strict Option Off' code - but still I good idea to have it 'ON' in future.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform