object reference not set to an instance of an object

luisrl <[email protected]>
Newsgroups gmane.comp.gnome.winforms
Message-ID <[email protected]>
I'm getting the next exception:

object reference not set to an instance of an object

In the next code:

foreach (Control ctl in ActiveForm.Controls)
{
      if (ctl.GetType() == typeof(TextBox))
   {
      ctl.Text = string.Empty;
   }
}

This is happening in Ubuntu 10.04 + Mono 2.8, in Windows Server 2008 + Mono
2.8 this is working fine.

Since in Ubuntu it doesn't tell me line where it's happening, I'm not sure
what's the problem.

Any ideas?

-- 
View this message in context: http://mono.1490590.n4.nabble.com/object-reference-not-set-to-an-instance-of-an-object-tp3019792p3019792.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.