[]
Gets the number of ITrendline objects in this collection.
Use this property to determine how many trendlines are currently associated with the parent series.
int Count { get; }
ReadOnly Property Count As Integer
worksheet.Range["A1:B4"].Value = new object[,] {
{"Month", "Sales"},
{"Jan", 10},
{"Feb", 12},
{"Mar", 15}
};
IChart chart = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 300, 200).Chart;
chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, false);
ITrendlines trendlines = chart.SeriesCollection[0].Trendlines;
trendlines.Add();
int count = trendlines.Count;