Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global variable
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00877826
Message ID:
00877835
Vues:
31
Hi Simplicio,

You can use static class members for global variables. Here is an example:
public class MyStaticTest
{
  static public int i = 100;
}

MessageBox.Show(MyStaticTest.i.ToString());
>im new to c# . how do i delacare a global variables dat can be access by the whole application? because in Foxpro i used to declare global variable for my connection to remote database.tnx
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform