[Mono-list] Application namespace isn't found? Can anyone help?
Stifu
stifu at free.fr
Tue Oct 27 04:22:21 EDT 2009
It *should* work without having to type the full namespace, provided you have
the needed project reference and the needed using statement in the concerned
class... but from what you said, it seems you already have both, so I don't
know what's wrong.
CajunCoder wrote:
>
> It seems that when I use System.Windows.Forms.Application.Exit() it works.
> Indeed, I did mean Exit() instead of Quit but I hate having to type the
> full namespace every single time. Oh well. I have another questions
> coming up though that *might* give a bit of challenge. lol
>
> Thanks again,
> Anthony
>
>
> Stifu wrote:
>>
>> Did you try prefixing application with the full namespace?
>> Also, System.Windows.Forms.Application doesn't have a Quit method that I
>> can see. Maybe you meant to use the Exit one?
>>
>>
>> CajunCoder wrote:
>>>
>>> Hello Everyone,
>>>
>>> I'm a long time .NET Windows developer just taking the plunge into Mono.
>>> So I've got the following code:
>>>
>>> DialogResult dlgRslt;
>>>
>>> dlgRslt = MessageBox.Show("Are you sure you want to exit?",
>>> "Confirm Exit",
>>> MessageBoxButtons.YesNo,
>>> MessageBoxIcon.Question);
>>> if(dlgRslt == DialogResult.Yes){
>>> Application.Quit();
>>> }
>>>
>>> Now. this code should work. But it doesn't! Instead, I get told by mono
>>> that "The name 'Application' does not exist in the current context"
>>>
>>> I am making sure I am using System and using System.Windows.Forms.
>>>
>>> Can anyone tell me what might be wrong? Also, I've taken away the ()
>>> from the statement and I get the same thing.
>>>
>>> Thanks!
>>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Application-namespace-isn%27t-found--Can-anyone-help--tp26072985p26073804.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list