Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi:
When I rewrite a tree control, I defined a set of class, when you first open the designer can add to the collection of data, but appeared to re-open out an exception. Type "MyTree.ObjectListInfo []" of the object can not be converted to type "MyTree.ObjectListInfo []". Can you help me?
Thanks
Code:
public partial class MyTree: TreeList
(
private bool fIsLoaded = false;
private string fTypeName = string.Empty;
private List <ObjectListInfo> fTypeList = new List <ObjectListInfo> ();

public bool TreeIsLoaded (get (return fIsLoaded;))

public string TypeName (get (return fTypeName;) set (fTypeName = value;))

public List <ObjectListInfo> TypeList (get (return fTypeList;) set (fTypeList = value;))

public MyTree ()
(
InitializeComponent ();
)
)
Posted

I believe that error means you need to define operator == for ObjectListInfo or ObjectListInfo[]
 
Share this answer
 
I think there might be serialized into an array when a result of List
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900