更简单的选择可能是使用属性提供程序:
[AttributeProvider(typeof(IListSource))]
您可以尝试使用程序集限定名称吗?并指定编辑器?
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] [Editor("System.Windows.Forms.Design.DataSourceListEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
实际上,只需指定程序集,就可以将其缩写为与版本无关:
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design")] [Editor("System.Windows.Forms.Design.DataSourceListEditor, System.Design", typeof(UITypeEditor))]