Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save the connection in web.config or other config
Message
 
À
24/11/2009 00:20:35
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
C# 3.0
OS:
Vista
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01436177
Message ID:
01436337
Vues:
44
>I'm probably displaying my typically dense nature here, but why isn't this hardcoding a tax rate?
>
>>>App.Configuration.TaxRate = 0.05M;

I'm not entirely sure what you're referring to, but if it's Rick's config. class what it actually does is instanciate the configuration class (which sets all the fields to their default value, such as 0.05M), then checks to see if the config. values are already in the .config file. If they are, it loads them from there (updating/replacing values as necessary). If it doesn't exist, it writes them to the file. So it's not really providing a hardcoded value as much as providing a default value.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform