Hello
I've the following code
Panel pnlData = new System.Windows.Forms.Panel();
CheckBox checkBox = new System.Windows.Forms.CheckBox();
checkBox.AutoSize = true;
checkBox.Dock = System.Windows.Forms.DockStyle.Top;
checkBox.Name = "checkBox";
checkBox.TabIndex = 1;
checkBox.Text = "checkBox";
checkBox.UseVisualStyleBackColor = true;
try
{
pnlData.Container.Add(checkBox);
}
catch (NullReferenceException a)
{ }
And there the NullReferenceException will be thrown alwas.
Can me someone tell why?
Thanks for all
Best regars
Wolfgang Uhr