я использую iTextSharp для создания таблицы, и я хочу сделать Generic из Pdfcells вместо добавления вручную, как я могу использовать общий для PdfPcells
PdfPCell HeadCell0 = new PdfPCell(new Paragraph("FullName", Htitle));
HeadCell0.BackgroundColor = Color.LIGHT_GRAY;
PdfPCell HeadCell1 = new PdfPCell(new Paragraph("Username", Htitle));
HeadCell1.BackgroundColor = Color.LIGHT_GRAY;
PdfPCell HeadCell2 = new PdfPCell(new Paragraph("Email", Htitle));
HeadCell2.BackgroundColor = Color.LIGHT_GRAY;
PdfPCell HeadCell3 = new PdfPCell(new Paragraph("Department", Htitle));
HeadCell3.BackgroundColor = Color.LIGHT_GRAY;
PdfPCell HeadCell4 = new PdfPCell(new Paragraph("AddedBy", Htitle));
HeadCell4.BackgroundColor = Color.LIGHT_GRAY;
PdfPCell HeadCell5 = new PdfPCell(new Paragraph("Account Type", Htitle));
HeadCell5.BackgroundColor = Color.LIGHT_GRAY;
Is [PdfPTable.getDefaultCell()] (http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfPTable.html#getDefaultCell%28%29) то, что вы ищете ? –