The foreach () is used to handle a group of similar category objects.
- Syntax:foreach (<Object> <Obect_name> in <collection>)
{
Statement(s);
}
- E.g.:
foreach (control c in this.control)
{
MessageBox.Show(c.GetType().Name)
}
Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger
0 comments :
Post a Comment