How to Convert list to IEnumerable type

Total Post:135

Points:947
C# 
 1122  View(s)
Ratings:
Rate this:
I have a list of files like this:

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

The return type in which this code has written is IEnumerable Now I wanted to return this list of projectFileList.

How can I convert this and return?

  1. Post:117

    Points:821
    Re: How to Convert list to IEnumerable type

    projectFileBM.GetAllProjectFileByProjectIdAndPartNum(projectID, string.Empty).ToList()

    Try the above

      Modified On Apr-06-2018 03:54:43 AM

Answer