Click here to Skip to main content
11,714,345 members (82,031 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Good Day,

I am a beginner and i want to get an understanding from the question below,

What is the difference between List and IList, which one has better performance and when to use List over IList and vice versa?

Thank you for your help.

Regards
Enos
Posted 25-Jul-13 22:10pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

  Permalink  
Comments
Nkhanedzeni at 26-Jul-13 4:30am
   
Thanks, for sure this will help me
chimcham at 26-Jul-13 4:34am
   
Please accept my answer :)
Nkhanedzeni at 26-Jul-13 4:37am
   
owk.
chimcham at 26-Jul-13 4:53am
   
thank you :)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

List is an class,
IList is an interface

You cannot explicitly create an IList, but you can create various classes that inherit from interfaces.
I suggest you Google Interfaces and Classes so you can understand the difference better.
  Permalink  
Comments
Nkhanedzeni at 26-Jul-13 4:16am
   
Thanks let me google as i still don't understand you

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 540
1 Maciej Los 259
2 Richard MacCutchan 230
3 OriginalGriff 140
4 F-ES Sitecore 140
0 Sergey Alexandrovich Kryukov 545
1 CHill60 375
2 Maciej Los 324
3 Richard MacCutchan 310
4 OriginalGriff 260


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 26 Jul 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100