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

C#

 
AnswerRe: Singleton vs Whatever Else Quandary Pin
Pete O'Hanlon24-Mar-15 19:32
mvePete O'Hanlon24-Mar-15 19:32 
GeneralRe: Singleton vs Whatever Else Quandary Pin
Z.C.M.25-Mar-15 4:00
professionalZ.C.M.25-Mar-15 4:00 
AnswerRe: Singleton vs Whatever Else Quandary Pin
jschell25-Mar-15 11:34
jschell25-Mar-15 11:34 
QuestionWhat is wrong with the structure of this code? Pin
Member 1147801824-Mar-15 0:25
Member 1147801824-Mar-15 0:25 
AnswerRe: What is wrong with the structure of this code? Pin
Ron Nicholson24-Mar-15 3:20
professionalRon Nicholson24-Mar-15 3:20 
GeneralRe: What is wrong with the structure of this code? Pin
Dave Kreskowiak24-Mar-15 3:48
mveDave Kreskowiak24-Mar-15 3:48 
GeneralRe: What is wrong with the structure of this code? Pin
Member 1147801824-Mar-15 11:06
Member 1147801824-Mar-15 11:06 
GeneralRe: What is wrong with the structure of this code? Pin
Ron Nicholson24-Mar-15 11:43
professionalRon Nicholson24-Mar-15 11:43 
I've looked at your code again and I have a question.

C#
// Check if Save_log is checked and if the Save_logs_path element has the default value in Settings.xml.
if (Save_logs_checkbox.Checked && path_selected == false)
{
    Save_logs_combobox.Enabled = true;


Apparently when this function is called, your path_selected is actually set to false. Is that true? If so then maybe you set path_selected to true before you set Save_logs_checkbox.checked to true.



All that said, I'd change the if statement to:
C#
if ((Save_logs_checkbox.Checked) && (path_selected == false))

I just added the parentheses to make sure that it is being evaluated in the way you want it to be. Might be ok, but I like to sprinkle them around. Smile | :)
Jack of all trades, master of none, though often times better than master of one.

AnswerRe: What is wrong with the structure of this code? Pin
Gerry Schmitz24-Mar-15 12:14
mveGerry Schmitz24-Mar-15 12:14 
Questionc# Pin
Member 1133602722-Mar-15 8:40
Member 1133602722-Mar-15 8:40 
AnswerRe: c# Pin
Afzaal Ahmad Zeeshan22-Mar-15 8:53
professionalAfzaal Ahmad Zeeshan22-Mar-15 8:53 
Questionusing usage (IDisposable) Pin
TMattC22-Mar-15 6:15
TMattC22-Mar-15 6:15 
AnswerRe: using usage (IDisposable) Pin
phil.o22-Mar-15 6:38
professionalphil.o22-Mar-15 6:38 
AnswerRe: using usage (IDisposable) Pin
OriginalGriff22-Mar-15 6:41
mveOriginalGriff22-Mar-15 6:41 
AnswerRe: using usage (IDisposable) Pin
manchanx22-Mar-15 6:54
professionalmanchanx22-Mar-15 6:54 
AnswerRe: using usage (IDisposable) Pin
jschell22-Mar-15 9:40
jschell22-Mar-15 9:40 
AnswerRe: using usage (IDisposable) Pin
TMattC22-Mar-15 9:49
TMattC22-Mar-15 9:49 
AnswerMessage Closed Pin
22-Mar-15 14:22
mveGerry Schmitz22-Mar-15 14:22 
GeneralRe: using usage (IDisposable) Pin
Richard Deeming23-Mar-15 3:17
mveRichard Deeming23-Mar-15 3:17 
GeneralMessage Closed Pin
23-Mar-15 4:21
mveGerry Schmitz23-Mar-15 4:21 
GeneralRe: using usage (IDisposable) Pin
Richard Deeming23-Mar-15 4:26
mveRichard Deeming23-Mar-15 4:26 
GeneralMessage Closed Pin
23-Mar-15 4:30
mveGerry Schmitz23-Mar-15 4:30 
GeneralRe: using usage (IDisposable) Pin
Richard Deeming23-Mar-15 4:34
mveRichard Deeming23-Mar-15 4:34 
GeneralMessage Removed Pin
23-Mar-15 4:49
mveGerry Schmitz23-Mar-15 4:49 
SuggestionRe: using usage (IDisposable) Pin
Richard Deeming23-Mar-15 3:28
mveRichard Deeming23-Mar-15 3:28 

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.