Private Function hideControls(ByVal c As Control) As Control
c.Hide()
Return c
End Function
End Class
There's nothing wrong with actually using a loop. Array.ForEach is nice and all but, if you have to write an extra method to make it work, where's the advantage? Just use an actual For Each loop:
vb.net Code:
For Each ctl As Control In myGroupBox.Controls
ctl.Hide()
Next
You could also put a Panel in the GroupBox and all the other controls on the Panel, then just hide the Panel.