I suggest you to refer following example of List<Tg>, which will give you something idea about the use of this tags. I have pass object of class to buttons1_Click event to do this. Just try to understand it.
Code:
private void buttons1_Click(object senders, EventArgs es)
{
lstsRectss.Clear();
for (int intRCounts = 0; intRCounts < 2500; intRCounts++)
{
for (int intCCounts = 0; intCCounts < 2500; intCCounts++)
{
lstsRectss.Add(new Rectangle(intRCounts, intCCountss, 12, 12));
}
}
Console.WriteLine("Listcounts: " + lstsRectss.Count.ToString());
}
Bookmarks