[Mono-winforms-list] object reference not set to an instance of an object

luisrl larlxz at gmail.com
Fri Oct 29 17:31:28 EDT 2010


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.


More information about the Mono-winforms-list mailing list