Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# back up program ? :S Pin
Vimalsoft(Pty) Ltd17-Sep-09 20:45
professionalVimalsoft(Pty) Ltd17-Sep-09 20:45 
Questionforeach simple question Pin
JollyMansArt17-Sep-09 10:14
JollyMansArt17-Sep-09 10:14 
AnswerRe: foreach simple question Pin
Ian Shlasko17-Sep-09 10:28
Ian Shlasko17-Sep-09 10:28 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:04
JollyMansArt17-Sep-09 12:04 
AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 12:08
mvePIEBALDconsult17-Sep-09 12:08 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:15
JollyMansArt17-Sep-09 12:15 
QuestionRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:22
JollyMansArt17-Sep-09 12:22 
AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 13:06
mvePIEBALDconsult17-Sep-09 13:06 
JollyMansArt wrote:
how would I check for if a valid variable Exists before passing the variable?


If you have to do that, then I suggest enumerating the environment variables, populating a Dictionary with the names and values, and using Contains to test whether or not the name exists.

But...

What are you going to do if it doesn't exist?
What if the variable name is embedded among other things or is recursive or something?


There may be times when you need to do that, and the technique will likely be useful in other situations, but it seems (to me) that what you want in this case is ExpandEnvironmentVariables.
AnswerRe: foreach simple question Pin
Ian Shlasko17-Sep-09 12:21
Ian Shlasko17-Sep-09 12:21 
AnswerRe: foreach simple question Pin
Luc Pattyn17-Sep-09 12:21
sitebuilderLuc Pattyn17-Sep-09 12:21 
AnswerRe: foreach simple question Pin
Christian Graus17-Sep-09 10:28
protectorChristian Graus17-Sep-09 10:28 
AnswerRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 10:32
mvePIEBALDconsult17-Sep-09 10:32 
GeneralRe: foreach simple question Pin
Christian Graus17-Sep-09 12:03
protectorChristian Graus17-Sep-09 12:03 
GeneralRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 12:05
mvePIEBALDconsult17-Sep-09 12:05 
GeneralRe: foreach simple question Pin
Christian Graus17-Sep-09 12:09
protectorChristian Graus17-Sep-09 12:09 
GeneralRe: foreach simple question Pin
Ian Shlasko17-Sep-09 12:30
Ian Shlasko17-Sep-09 12:30 
GeneralRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:36
JollyMansArt17-Sep-09 12:36 
GeneralRe: foreach simple question Pin
PIEBALDconsult17-Sep-09 13:35
mvePIEBALDconsult17-Sep-09 13:35 
GeneralRe: foreach simple question Pin
JollyMansArt17-Sep-09 12:09
JollyMansArt17-Sep-09 12:09 
AnswerRe: foreach simple question Pin
Not Active17-Sep-09 13:26
mentorNot Active17-Sep-09 13:26 
Questiongood books for XML With windows c# Pin
santosh_anu17-Sep-09 9:44
santosh_anu17-Sep-09 9:44 
AnswerRe: good books for XML With windows c# Pin
Christian Graus17-Sep-09 10:29
protectorChristian Graus17-Sep-09 10:29 
AnswerRe: good books for XML With windows c# Pin
PIEBALDconsult17-Sep-09 10:45
mvePIEBALDconsult17-Sep-09 10:45 
Questionhow to add more buttons,images and logos in messagebox in c#. Pin
Ramesh Reddy1111117-Sep-09 7:32
Ramesh Reddy1111117-Sep-09 7:32 
AnswerRe: how to add more buttons,images and logos in messagebox in c#. PinPopular
EliottA17-Sep-09 7:55
EliottA17-Sep-09 7:55 

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.