I have been using this ((Control)name)
for some time, but I don't understand the construction of the brackets and what that means.
For example, when I'm looping through controls on a page, I do so like this:
foreach (Control ctrl in Booking_Quote.Controls)
{
if (ctrl is Panel)
{
foreach (Control tb in ctrl.Controls)
{
if (tb is TextBox)
{
((TextBox)tb).Text = "Hello world";
}
else
{
}
}
}
}
I am looking to know what ((TextBox)tb)
means.