Click here to Skip to main content
12,449,605 members (60,124 online)
Rate this:
 
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 26-Jul-13 4:30am
   
Thanks, for sure this will help me
chimcham 26-Jul-13 4:34am
   
Please accept my answer :)
Nkhanedzeni 26-Jul-13 4:37am
   
owk.
chimcham 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160811.3 | Last Updated 26 Jul 2013
Copyright © CodeProject, 1999-2016
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