---
title: "Difference between IList and List in C#"  
description: "In this blog, I’m explaining about IList and List in C#IList: It is non-generic collection object that can be individually accessed by index. The ILis"  
author: "priyanka kushwaha"  
published: 2015-03-09  
updated: 2018-02-22  
canonical: https://www.mindstick.com/blog/830/difference-between-ilist-and-list-in-c-sharp  
category: ".net"  
tags: ["c#", "collection"]  
reading_time: 1 minute  

---

# Difference between IList and List in C#

In this [blog](https://www.mindstick.com/articles/12705/myths-and-misconception-about-blog), I’m explaining about IList and List in C#

**IList:** It is non-generic [collection](https://www.mindstick.com/articles/1718/collections-in-java) object that can be individually accessed by index. The IList [interface](https://www.mindstick.com/articles/12101/interfaces-in-java-extending-interfaces) implemented from two [interfaces](https://www.mindstick.com/articles/12100/interfaces-in-java-real-life-example) and they are ICollection and IEnumerable.

## Example:

```
using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace IListExample{    class Program    {        static void Main(string[] args)        {            IList ilst = new string[3];            ilst.Add("Sita");            ilst.Add("Geeta");            foreach (string num in ilst)                Console.WriteLine(num);             Console.ReadKey();        }    }}
```

![Difference between IList and List in C#](https://www.mindstick.com/blogs/c5705d32-06f2-492c-abc9-69f92a9ccc75/images/bb90eb58-41ac-4027-adfd-c385e0a5745b.png)

\

**List:** A list is a strongly typed list of object that can be accessed by index. It can be founder under System.collection.Generic namespace.

##### Example:

```
using System;using System.Collections;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace IListExample{    class Program    {        static void Main(string[] args)        {            IList<string> ilst = new List<string>();            ilst.Add("Sita");            ilst.Add("Geeta");            foreach (string num in ilst)                Console.WriteLine(num);            Console.ReadKey();        }    }}
```

**Output:**

Sita

Geeta

---

Original Source: https://www.mindstick.com/blog/830/difference-between-ilist-and-list-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
