[Mono-list] Application namespace isn't found? Can anyone help?

Stifu stifu at free.fr
Tue Oct 27 03:22:06 EDT 2009


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--tp26072985p26073267.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list