Click here to Skip to main content
16,005,169 members
Home / Discussions / C#
   

C#

 
AnswerRe: Convert a String to Binary Pin
-Rowan-13-Dec-05 21:25
-Rowan-13-Dec-05 21:25 
GeneralRe: Convert a String to Binary Pin
climbjm14-Dec-05 0:08
climbjm14-Dec-05 0:08 
GeneralRe: Convert a String to Binary Pin
-Rowan-14-Dec-05 0:41
-Rowan-14-Dec-05 0:41 
AnswerRe: Convert a String to Binary Pin
Vikram A Punathambekar13-Dec-05 21:28
Vikram A Punathambekar13-Dec-05 21:28 
AnswerRe: Convert a String to Binary Pin
MarcelErz13-Dec-05 21:44
MarcelErz13-Dec-05 21:44 
Questionopen a remote excel file Pin
cerdemorenel13-Dec-05 20:07
cerdemorenel13-Dec-05 20:07 
QuestionDefining Global Variable Pin
freshonlineMax13-Dec-05 20:03
freshonlineMax13-Dec-05 20:03 
AnswerRe: Defining Global Variable Pin
-Rowan-13-Dec-05 21:07
-Rowan-13-Dec-05 21:07 
Given I have been programming C# for 5 days I am not exactly sure if this is correct, but it works for me:

<br />
namespace theGlobals<br />
{<br />
	public class myGlobals<br />
	{<br />
		static public string myGlobal1;<br />
		static public string myGlobal2;<br />
	}<br />
}<br />


Whenever you want to get your global you just reference:
myGlobals.myGlobal1

The static values remain static across any and all coppies of this class that you make. Infact I never even make a new class - e.g., I never use:
<br />
myGlobals blah = new(myGlobals());<br />


anywhere in my code.

Good Luck.

-Rowan
GeneralRe: Defining Global Variable Pin
MarcelErz13-Dec-05 21:27
MarcelErz13-Dec-05 21:27 
GeneralRe: Defining Global Variable Pin
freshonlineMax13-Dec-05 22:45
freshonlineMax13-Dec-05 22:45 
GeneralRe: Defining Global Variable Pin
MarcelErz13-Dec-05 23:06
MarcelErz13-Dec-05 23:06 
GeneralRe: Defining Global Variable Pin
freshonlineMax14-Dec-05 18:04
freshonlineMax14-Dec-05 18:04 
GeneralRe: Defining Global Variable Pin
ariez78631-Dec-08 21:00
ariez78631-Dec-08 21:00 
AnswerRe: Defining Global Variable Pin
Vikram A Punathambekar13-Dec-05 21:32
Vikram A Punathambekar13-Dec-05 21:32 
QuestionCustom window in C# Pin
CoolASL13-Dec-05 18:35
CoolASL13-Dec-05 18:35 
AnswerRe: Custom window in C# Pin
MarcelErz13-Dec-05 21:34
MarcelErz13-Dec-05 21:34 
GeneralRe: Custom window in C# Pin
CoolASL13-Dec-05 22:15
CoolASL13-Dec-05 22:15 
GeneralRe: Custom window in C# Pin
MarcelErz13-Dec-05 22:32
MarcelErz13-Dec-05 22:32 
GeneralRe: Custom window in C# Pin
CoolASL13-Dec-05 22:35
CoolASL13-Dec-05 22:35 
GeneralRe: Custom window in C# Pin
CoolASL14-Dec-05 2:30
CoolASL14-Dec-05 2:30 
QuestionTextfile and its schema Pin
Mahi.Ragava13-Dec-05 18:19
Mahi.Ragava13-Dec-05 18:19 
AnswerRe: Textfile and its schema Pin
MarcelErz13-Dec-05 22:03
MarcelErz13-Dec-05 22:03 
GeneralRe: Textfile and its schema Pin
Mahi.Ragava13-Dec-05 22:09
Mahi.Ragava13-Dec-05 22:09 
GeneralRe: Textfile and its schema Pin
MarcelErz13-Dec-05 22:37
MarcelErz13-Dec-05 22:37 
GeneralRe: Textfile and its schema Pin
Mahi.Ragava13-Dec-05 23:01
Mahi.Ragava13-Dec-05 23:01 

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.