Home > DeveloperSection > Forums > Code for adding to IEnumerable
Pravesh Singh
Pravesh Singh

Total Post:101

Points:709
Posted on    April-06-2013 1:44 AM

 C# C# 
Ratings:


 1 Reply(s)
 818  View(s)
Rate this:
Hi Guys

I have an enumerator like this

IEnumerable<System.Windows.Documents.FixedPage> page;
How can I add a page (eg: D:\newfile.txt) to it? I have tried Add, Append, Concat etc But nothing worked for me.

Thanks 


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    April-06-2013 8:31 AM

Hi Pravesh!

You can try this way

IEnumerable<System.Windows.Documents.FixedPage> page = new List<System.Windows.Documents.FixedPage>(your items list here)

you try another way as below

IList<System.Windows.Documents.FixedPage> page = new List<System.Windows.Documents.FixedPage>(1);
page.Add(your item Here);

I hope it solve your problem 

Don't want to miss updates? Please click the below button!

Follow MindStick