解决CSharp 序列化时未能找到类型System.String上的构造函数

解决控件自定义属性为List<string>时候,在设计器中添加字符串是出现“未能找到类型System.String上的构造函数”错误。

在属性上添加

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]  [Editor("System.Windows.Forms.Design.StringCollectionEditor, System.Design", "System.Drawing.Design.UITypeEditor, System.Drawing")]

你可能感兴趣的:(CustomControl)