Guest_imported
New member
- Jan 1, 1970
- 0
Hi,I hope you can help me,coz I'm stuck.
I can't understand some things about defining collections.
Here is an example
public class Animals:CollectionBase
{
public void Add(Animal NewAnimal);
{
List.Add(newAnimal);
}
}
a.How can CollectionBase class implement IList interface if it doesn't implement ALL of IList's methods?How is that possible?
b.List property returns a varible of type IList,which points to an object from which this List property was called from?Right?
c.How can I use List.Add() method if I haven't defined it yet?Where is this method defined?
I hope you will find some time to help me and for that I thank you
I can't understand some things about defining collections.
Here is an example
public class Animals:CollectionBase
{
public void Add(Animal NewAnimal);
{
List.Add(newAnimal);
}
}
a.How can CollectionBase class implement IList interface if it doesn't implement ALL of IList's methods?How is that possible?
b.List property returns a varible of type IList,which points to an object from which this List property was called from?Right?
c.How can I use List.Add() method if I haven't defined it yet?Where is this method defined?
I hope you will find some time to help me and for that I thank you