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