Most of my work is done outside the PC and Microsoft arena; I am not very familiar with Visual Studio C++ compilers, if they don't warn you on if( n = 2) then that is too bad; a decent compiler knows such statement is valid, hence no error, but probably wrong, hence a warning, which can be disabled as all messages normally have a numeric code, or avoided by writing unambiguous code as in if((n = 2)!=0)...
That is what warnings are all about: pointing your attention at things that might be intentional and correct, and maybe are not.
BTW: most compilers also would warn you the condition is always true, making the if , and when present the else part, redundant.
Luc Pattyn [Forum Guidelines][My Articles] DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
i some code as bellow. it is mothed is called when click on MenuItem.problem is when i click item and command = "LOGOFF", it work correctly, but why i click a MenuItem and its command = "EXIT" , the visual studio doesn't stop debuging even my form was disappear?
void MenuItemCommand(ExtenderMenu btn )
switch (btn.Command )
Form2 f = null;
if ( f == null || f.IsDisposed)
f = new Form2();
You're getting a lot of help here, which is great. But, what you should learn from this is that you need to do some basic study, to understand these VERY basic things. I sure hope no-one is actually going to use this code, the only place you should be in, is a class. And, you should talk to your teacher first, as he can help you better if he knows how stuck you are, and doesn't read other people's code and assume you wrote it.
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
i've created Windows services connecting to web services. but i wz just wondering...
i hv a web service i want utilised by a mobile application. is there anyway i can achieve this? Or rather, is there anything like an equivalent of a windows service on mobile devices?
pls help ASAP.
He who goes for revenge must first dig two graves.