Status of Dispose()'d Form

  • Thread starter Thread starter Martijn Mulder
  • Start date Start date
M

Martijn Mulder

In this tiny program I address a Disposed() Form object. I expect an
exeption but don't get one. What is the status of a Disposed() Control?



using System;
using System.Windows.Forms;
class Class
{
static void Main()
{
Form form=new Form();
form.Text="Make a jazz noise here";
Console.WriteLine("form status = {0}",form);
form.Dispose();
Console.WriteLine("form status = {0}",form);
}
}

_______________________
Output:

form status = System.Windows.Forms.Form, Text: Make a jazz noise here
form status = System.Windows.Forms.Form, Text: Make a jazz noise here
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top