【发布时间】:2010-04-02 02:39:17
【问题描述】:
public interface ITest {
void Somethink();
}
public class Test1 : ITest {
public void Somethink() { /* do stuff */ }
public int Test1Property { get; set; }
}
public class Test2 : ITest {
public void Somethink() { /* do stuff */ }
public float Test2Property { get; set; }
}
//Main class
public class MainClass
{
[TypeConverter(ExpandableObjectConverter)]
public ITest test { get; set; }
}
好的,我有这样的东西。 MainClass 的实例由 PropertyGrid 选择。
如何制作实现 ITest(此处为 Test1 和 Test2)的类的对象的 DropDownList
【问题讨论】:
标签: c# .net .net-3.5 propertygrid