Answer» Hello!!
I'm programming in C# and need some help. There is one thing it this code that seems to be causing a problem.
This is a part of the code:
Code: [Select]DialogResult dlgRes = [color=red][b]null[/b][/color] dlgRes = MessageBox.Show( "Windows XP has caused an illegal operation and will now CLOSE.", "", "This is the normal behaviour of Windows. Please punch a hole in the monitor", "and smash the keyboard to continue. If the problem persists, please set the mouse on fire.", MessageBoxButtons.OK, MessageBoxIcon.Error); The word highlighted in red is the problem. When I look in the errors, it says ; expected. When I add the ; after the word, I get a whole bunch of errors that need to be fixed. I've being tinkering with the code all day and had no luck.
Anyone KNOW how to fix ??
Thank you.
P.S I don't want anyone complaining about what the dialog box says.I am not up to PAR with C#, being that I am a C++ GUY, but have you tried other conditions for this instruction other than NULL, possibly an inverse function that will perform the same output? Such as TRUE instead of FALSE and the conditions opposite of the arguement. I have seen before where it should work one way, and when you inverse the logic, whalla it compiles and is happy... Makes no sense as to why it doesnt like to compile and run straight forward, but by inverse logic it compiles and operates!
I just scratch my head and say ok,,, its working, lets move on to the next project! ha ha
DaveThanks for the reply. I'll try that ASAP.
|