© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
10 replies
_._xena_._

❔ Difference between these variants

I'm learning c# right now and I saw something as
ArrayList myList = new ArrayList();
IList myList = new ArrayList();
ICollection myList = new ArrayList();

so in this case defining myList as in the first one -which is "ArrayList myList = new ArrayList();"- it has more methods in it. But we can do the others as well. My question is if you're able to have more methods and do much more things, why use IList myList = new ArrayList(); or ICollection myList = new ArrayList(); instead ? What is the difference ?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

What's the difference between these two libraries? [Answered]
C#CC# / help
4y ago
❔ What is the difference between these two pieces of code?
C#CC# / help
3y ago