CODE FOR ADDING TO IENUMERABLE

Pravesh Singh

Total Post:101

Points:709
Posted by  Pravesh Singh
C# 
C#
 1060  View(s)
Ratings:
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 
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: Code for adding to IEnumerable

    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 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!