0
为什么以下方式不起作用?fx20中的itext pdf帮助
phrase.AddAll(new ICollection<Chunk>[] { noteChunk, noteAttributeChunk });
错误8无法隐式转换类型 'iTextSharp.text.Chunk' 到 '了System.Collections.Generic.ICollection'。
只是好奇,
杆。
为什么以下方式不起作用?fx20中的itext pdf帮助
phrase.AddAll(new ICollection<Chunk>[] { noteChunk, noteAttributeChunk });
错误8无法隐式转换类型 'iTextSharp.text.Chunk' 到 '了System.Collections.Generic.ICollection'。
只是好奇,
杆。
您需要一个通用参数ICollection
,如ICollection<Chunk>
,但问题是ICollection
是一个接口,而不是一个类。你应该这样做:
phrase.AddAll(new Chunk[] { noteChunk, noteAttributeChunk });
不错,谢谢你的洞察力。 – Rod 2010-10-22 20:18:03