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

C#

 
GeneralRe: i need help............ Pin
Richard MacCutchan7-Mar-15 3:03
mveRichard MacCutchan7-Mar-15 3:03 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 3:56
mveOriginalGriff7-Mar-15 3:56 
GeneralRe: i need help............ Pin
Richard MacCutchan7-Mar-15 4:15
mveRichard MacCutchan7-Mar-15 4:15 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 4:33
mveOriginalGriff7-Mar-15 4:33 
AnswerRe: i need help............ Pin
Afzaal Ahmad Zeeshan7-Mar-15 0:05
professionalAfzaal Ahmad Zeeshan7-Mar-15 0:05 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 2:21
mveOriginalGriff7-Mar-15 2:21 
AnswerRe: i need help............ Pin
Afzaal Ahmad Zeeshan7-Mar-15 3:09
professionalAfzaal Ahmad Zeeshan7-Mar-15 3:09 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 3:55
mveOriginalGriff7-Mar-15 3:55 
Afzaal Ahmad Zeeshan wrote:
Now coming to your claims, you said this code would throw warning,

 

C#
if (a == b);
   c();

 

But you didn't tell what type these objects hold. Are they strings, integers or a class object and so on. Also, there would again be a problem, the c, being static or not and so on. Now, let me talk about this scenario in a way, have a look at the following code,

And there, in a nutshell, is the reason why warnings are significant.
The problem is nothing to do with the type of the object, the static or instance access to the method.
The problem is that the if is terminated by the semicolon at the end of the line, so the "c" method is always called regardless of the values in a and b...and it's a bugger to see - even when you know something is wrong.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: i need help............ Pin
Afzaal Ahmad Zeeshan7-Mar-15 3:59
professionalAfzaal Ahmad Zeeshan7-Mar-15 3:59 
GeneralRe: i need help............ Pin
manchanx7-Mar-15 4:30
professionalmanchanx7-Mar-15 4:30 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 4:35
mveOriginalGriff7-Mar-15 4:35 
GeneralRe: i need help............ Pin
Afzaal Ahmad Zeeshan7-Mar-15 4:41
professionalAfzaal Ahmad Zeeshan7-Mar-15 4:41 
GeneralRe: i need help............ Pin
BillWoodruff7-Mar-15 4:56
professionalBillWoodruff7-Mar-15 4:56 
GeneralRe: i need help............ Pin
OriginalGriff7-Mar-15 5:06
mveOriginalGriff7-Mar-15 5:06 
AnswerRe: i need help............ Pin
BillWoodruff7-Mar-15 5:05
professionalBillWoodruff7-Mar-15 5:05 
QuestionHelp me, very urgent problem, about after running the program design. Pin
Member 114460806-Mar-15 16:25
Member 114460806-Mar-15 16:25 
AnswerRe: Help me, very urgent problem, about after running the program design. Pin
Dave Kreskowiak6-Mar-15 17:58
mveDave Kreskowiak6-Mar-15 17:58 
GeneralRe: Help me, very urgent problem, about after running the program design. Pin
Member 114460807-Mar-15 16:51
Member 114460807-Mar-15 16:51 
AnswerRe: Help me, very urgent problem, about after running the program design. Pin
Richard MacCutchan6-Mar-15 21:40
mveRichard MacCutchan6-Mar-15 21:40 
AnswerRe: Help me, very urgent problem, about after running the program design. Pin
OriginalGriff6-Mar-15 21:47
mveOriginalGriff6-Mar-15 21:47 
GeneralRe: Help me, very urgent problem, about after running the program design. Pin
Member 114460807-Mar-15 16:50
Member 114460807-Mar-15 16:50 
GeneralRe: Help me, very urgent problem, about after running the program design. Pin
OriginalGriff7-Mar-15 21:03
mveOriginalGriff7-Mar-15 21:03 
GeneralRe: Help me, very urgent problem, about after running the program design. Pin
phil.o7-Mar-15 8:19
professionalphil.o7-Mar-15 8:19 
QuestionNeed help changing a value in an application Pin
hopper16-Mar-15 12:11
hopper16-Mar-15 12:11 
AnswerRe: Need help changing a value in an application Pin
Richard Andrew x646-Mar-15 12:49
professionalRichard Andrew x646-Mar-15 12:49 

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.