Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Initializing your variables when you define them
Message
De
15/02/2009 02:14:13
 
 
À
15/02/2009 01:56:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01381858
Message ID:
01381859
Vues:
49
>Do you do it? I've read in one Microsoft Press book not to if you don't need to, but read in another that you should. If you check the setting to treat all warnings as error in your project more than likely at some point you will be nagged about it if you don't.

Yes, I do. This is like that all over the place. Here is an example:
            Dim lcConnection As String = ""
            Dim lcHitLanguage As String = ""
            Dim lcString As String = ""
            Dim lcTempDir As String = ""
            Dim lcValue As String = ""
            Dim lnBackend As Integer = 0
            Dim lnConnection As Integer = 0
            Dim lnCounter As Integer = 0
            Dim lnCounter2 As Integer = 0
            Dim lnShowError As Integer = 0
            Dim lnSQLMode As Integer = 0
            Dim lnTimeZoneOffset As Integer = 0
This provides an overview of all developers of an example of the content of the variable. For a date, I will initliaze to nothing and similar definition for other types of variables.
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