Click here to Skip to main content
15,887,350 members
Home / Discussions / C#
   

C#

 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 2:43
mvePIEBALDconsult9-May-11 2:43 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
Luc Pattyn9-May-11 2:51
sitebuilderLuc Pattyn9-May-11 2:51 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 3:01
mvePIEBALDconsult9-May-11 3:01 
QuestionRe: Where to keep the public variables & Functions? VS2010 Pin
#realJSOP9-May-11 8:18
mve#realJSOP9-May-11 8:18 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 14:40
mvePIEBALDconsult9-May-11 14:40 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
Luc Pattyn9-May-11 2:49
sitebuilderLuc Pattyn9-May-11 2:49 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 3:13
mvePIEBALDconsult9-May-11 3:13 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
#realJSOP9-May-11 8:15
mve#realJSOP9-May-11 8:15 
When I have variables that need to be accessible application-wide, I keep them in a static class. Using some of your example code:

C#
public static class Globals
{
    public static string ConStr_1 = "...";

    public static void MyMethod()
    {
        // do something 
    }
}

".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997


GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
SilimSayo9-May-11 11:38
SilimSayo9-May-11 11:38 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult9-May-11 14:14
mvePIEBALDconsult9-May-11 14:14 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
SilimSayo11-May-11 6:30
SilimSayo11-May-11 6:30 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
PIEBALDconsult11-May-11 14:31
mvePIEBALDconsult11-May-11 14:31 
AnswerRe: Where to keep the public variables & Functions? VS2010 Pin
Shameel9-May-11 18:10
professionalShameel9-May-11 18:10 
GeneralRe: Where to keep the public variables & Functions? VS2010 Pin
Paramu197310-May-11 0:12
Paramu197310-May-11 0:12 
QuestionSpace in a c# wordAddIn project Pin
Pierre besquent9-May-11 0:43
Pierre besquent9-May-11 0:43 
Questionkdtele disconnect problem Pin
mobasher8-May-11 23:22
mobasher8-May-11 23:22 
AnswerRe: kdtele disconnect problem Pin
Dave Kreskowiak9-May-11 1:23
mveDave Kreskowiak9-May-11 1:23 
Questionc# application hang plz help Pin
spider_vikas8-May-11 20:57
spider_vikas8-May-11 20:57 
AnswerRe: c# application hang plz help Pin
Łukasz Nowakowski8-May-11 21:41
Łukasz Nowakowski8-May-11 21:41 
GeneralWhich kind of connects can be captured by Win32_ServerConnection!! [modified] Pin
Member 46594858-May-11 17:39
Member 46594858-May-11 17:39 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 20:31
mveOriginalGriff8-May-11 20:31 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:08
Member 46594858-May-11 21:08 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:18
mveOriginalGriff8-May-11 21:18 
GeneralRe: Unable to get connected users by Win32_ServerConnection!! Pin
Member 46594858-May-11 21:22
Member 46594858-May-11 21:22 
AnswerRe: Unable to get connected users by Win32_ServerConnection!! Pin
OriginalGriff8-May-11 21:29
mveOriginalGriff8-May-11 21:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.