2 Replies - 164 Views - Last Post: 07 August 2012 - 07:17 AM Rate Topic: -----

#1 ralphbandian  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-August 12

finding controls in two containers using 1 foreach?

Posted 06 August 2012 - 11:17 PM

I'm trying to access controls in two containers...I could do it by doing 2 foreach statement like
[code]
foreach(Controls in Panel1.Controls)
{
Is This A Good Question/Topic? 0
  • +

Replies To: finding controls in two containers using 1 foreach?

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 6490
  • View blog
  • Posts: 23,579
  • Joined: 12-June 08

Re: finding controls in two containers using 1 foreach?

Posted 07 August 2012 - 06:50 AM

You need to explain more of what you are doing and what you want to do.
Was This Post Helpful? 0
  • +
  • -

#3 Curtis Rutland  Icon User is online

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 3803
  • View blog
  • Posts: 6,410
  • Joined: 08-June 10

Re: finding controls in two containers using 1 foreach?

Posted 07 August 2012 - 07:17 AM

If you're looking to use one loop to search two collections that contain the same type, you'll want to Concat the two collections together.

Edit: Please do not open duplicate topics.

http://www.dreaminco...sing-1-foreach/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1