c# - Component TypeConverter trouble -
i have calss 2 properties. 1 property must seen (depended) in propertygrid when other property contains appropriate value. have created own custompropertiestypeconverter
:
public abstract class custompropertiestypeconverter<tcomponent> : typeconverter { ... public override propertydescriptorcollection getproperties(itypedescriptorcontext context, object value, attribute[] attributes) { var component = (tcomponent)value; //error line ...
everything works fine, once. properties dissapear propertygrid after project rebuilding. when run project vs have got following error:
[a]mycomponent cannot cast [b]mycomponent. type originates 'test, version=1.0.1.169, culture=neutral, publickeytoken=null' in context 'loadneither' @ location 'c:\users\g_o\appdata\local\microsoft\visualstudio\11.0\projectassemblies\hszseh7801\test.exe'. type b originates 'test, version=1.0.1.169, culture=neutral, publickeytoken=null' in context 'loadneither' @ location 'c:\users\g_o\appdata\local\microsoft\visualstudio\11.0\projectassemblies\ug5nbdgn01\test.exe'.
how can solve this?
Comments
Post a Comment