Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class with static members and methods
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00977883
Message ID:
00978121
Vues:
36
Hey, Einar,

Just wanted to jump in with my two cents (everything Bonnie said is right-on)

I generally use statics for two things...variables/settings that get set at the beginning of the app and don't change, and local look-up tables (as Bonnie said, datasets that get used throughout the app)

An example of the first is when a user signs on with a user ID and Password - if the authentication succeeds, I pull down the full name of the user, so that I can display the full name on different forms/reports throughout the app. No need to re-retrieve it from SQL everytime.

Second example is a table of status codes that might be used in several forms (for pick-lists, lookup-tables, etc.) I pull down the table at the beginning of the app, and store it as a static datatable.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform