Click here to Skip to main content
15,890,186 members
Home / Discussions / C#
   

C#

 
GeneralRe: dates reminder from database Pin
Heath Stewart26-Apr-04 3:02
protectorHeath Stewart26-Apr-04 3:02 
GeneralWeb control Pin
osto25-Apr-04 9:22
osto25-Apr-04 9:22 
GeneralRe: Web control Pin
Mazdak25-Apr-04 9:31
Mazdak25-Apr-04 9:31 
GeneralRe: Web control Pin
osto25-Apr-04 9:56
osto25-Apr-04 9:56 
GeneralRe: Web control Pin
Heath Stewart25-Apr-04 17:41
protectorHeath Stewart25-Apr-04 17:41 
GeneralGlobal Variables Pin
STW25-Apr-04 9:19
STW25-Apr-04 9:19 
GeneralRe: Global Variables Pin
kobyb25-Apr-04 9:24
kobyb25-Apr-04 9:24 
GeneralRe: Global Variables Pin
Colin Angus Mackay25-Apr-04 9:55
Colin Angus Mackay25-Apr-04 9:55 
Global variables are generally a sign of poorly thought out design. However there are cases when you want to make something available to classes across your application (like values from the application's config class).

I would suggest a couple of approaches:

1. Is to make the variable available through a static property of an appropriate class.

2. Is to make a class (a singleton) that exposes these values through static properties. For instance a Config class that retrieves the information from a config file and exposes them to the rest of the application.


"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar

Coming soon: The Second EuroCPian Event


GeneralC# with MFC Pin
kobyb25-Apr-04 9:18
kobyb25-Apr-04 9:18 
GeneralRe: C# with MFC Pin
osto25-Apr-04 9:57
osto25-Apr-04 9:57 
GeneralRe: C# with MFC Pin
Tom Larsen25-Apr-04 16:46
Tom Larsen25-Apr-04 16:46 
GeneralRe: C# with MFC - Code Pin
kobyb26-Apr-04 11:09
kobyb26-Apr-04 11:09 
GeneralRe: C# with MFC - Code Pin
osto26-Apr-04 15:56
osto26-Apr-04 15:56 
GeneralRe: C# with MFC - Code Pin
kobyb28-Apr-04 10:03
kobyb28-Apr-04 10:03 
Questionhow to change workingarea?? Pin
foof1ghter25-Apr-04 8:45
sussfoof1ghter25-Apr-04 8:45 
AnswerRe: how to change workingarea?? Pin
ian mariano25-Apr-04 14:23
ian mariano25-Apr-04 14:23 
AnswerRe: how to change workingarea?? Pin
Heath Stewart25-Apr-04 17:38
protectorHeath Stewart25-Apr-04 17:38 
Generalsubscript text Pin
Stefan Troschuetz25-Apr-04 6:58
Stefan Troschuetz25-Apr-04 6:58 
GeneralRe: subscript text Pin
Heath Stewart25-Apr-04 7:56
protectorHeath Stewart25-Apr-04 7:56 
Generalsending xml bitween client, server win app Pin
hmdhmd24-Apr-04 22:08
hmdhmd24-Apr-04 22:08 
GeneralRe: sending xml bitween client, server win app Pin
Heath Stewart25-Apr-04 4:22
protectorHeath Stewart25-Apr-04 4:22 
GeneralRe: sending xml bitween client, server win app Pin
hmdhmd27-Apr-04 0:34
hmdhmd27-Apr-04 0:34 
GeneralRe: sending xml bitween client, server win app Pin
Heath Stewart27-Apr-04 3:00
protectorHeath Stewart27-Apr-04 3:00 
Question[urgent, please help] Is it possible to use a Windows Form as a control? Pin
gUrM33T24-Apr-04 18:49
gUrM33T24-Apr-04 18:49 
AnswerRe: [urgent, please help] Is it possible to use a Windows Form as a control? Pin
DougW4824-Apr-04 21:59
DougW4824-Apr-04 21:59 

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.