Hi Everybody, its about my 4th day on C# and all seems to be going
smoothly however I've started to get into Datagrids and in particular
binding data sources to them. In the documentation it says I can bind
all the usual Datasets etc but it also says I can bind the following:
Any component that implements the IListSource interface
Any component that implements the IList interface
Now I have a class that holds lots of repeating data, and to save me
having to create datasets and looping through adding the data manually
then binding to the datagrid. It would be great to implement the IList
or IListSource interface, trouble is I'm not really sure how to get
started.... I kind of figures it goes:
using System.Collections;
public class Myclass: IList
And I know I must now implement certain methods like:
System.Collections.ICollection.CopyTo(System.Array , int)
But I have no idea what to do with these methods, you could say I'm a
bit clueless with this and I could do with a push in the right
direction.
I really would appreciate some guidance on this as my searches in
various help files and websites hasnt helped.
Thanks