M
Mike P
I am looking through some code and have found a lot of methods that
return an interface such as ICollection.
What is the reason for this? If you return ICollection, does that mean
that you can return any collection object that inherits from it rather
than if you have a method returning an ArrayList, you are stuck with
only being able to return an ArrayList?
return an interface such as ICollection.
What is the reason for this? If you return ICollection, does that mean
that you can return any collection object that inherits from it rather
than if you have a method returning an ArrayList, you are stuck with
only being able to return an ArrayList?