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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -