---
title: "How to Convert list to IEnumerable type"  
description: "How to Convert list to IEnumerable type"  
author: "Anonymous User"  
published: 2014-11-03  
updated: 2014-11-04  
canonical: https://www.mindstick.com/forum/2502/how-to-convert-list-to-ienumerable-type  
category: "asp.net"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to Convert list to IEnumerable type

I have a list of [files](https://www.mindstick.com/articles/23302/the-importance-and-advantage-of-keeping-your-important-files-on-the-cloud) like this:\

```
List<ProjectFile> projectFilelist = null;            projectFilelist = projectFileBM.GetAllProjectFileByProjectIdAndPartNum(projectID, string.Empty);
```

The return type in which this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) has written is IEnumerable [Now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) I wanted to return this list of projectFileList.\

How can I [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) this and return?

## Replies

### Reply by Anonymous User

```
projectFileBM.GetAllProjectFileByProjectIdAndPartNum(projectID, string.Empty).ToList()
```

Try the above


---

Original Source: https://www.mindstick.com/forum/2502/how-to-convert-list-to-ienumerable-type

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
