If my array property has null items, then I can't open CollectionEditor from PropertyGrid. I get error with text 'component'. How can I fix it?
public partial class Form1 : Form
{
public Test[] test { get; set; }
public Form1()
{
InitializeComponent();
test = new Test[5];
test[2] = new Test() { Name = "2" };
propertyGrid1.SelectedObject = this;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))]
public class Test
{
public string Name { get; set; }
}
Maybe I should override some methods in my custom CollectionEditor, but i don't know which