tags:

views:

16

answers:

1

Hi All,

Why wouldn't the following work?

phrase.AddAll(new ICollection<Chunk>[] { noteChunk, noteAttributeChunk });

Error 8 Cannot implicitly convert type 'iTextSharp.text.Chunk' to 'System.Collections.Generic.ICollection'.

Just curious,

rod.

A: 

You need to a generic parameter to ICollection such as ICollection<Chunk>, but the problem is that ICollection is an interface and not a class. You should probably do this instead:

phrase.AddAll(new Chunk[] { noteChunk, noteAttributeChunk });
klausbyskov
Nice, thanks for the insight.
rod