🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #641

C# 2.0

#641
From: Jon Shemitz
Date: Wed, 21 Jul 2004 06:56
16 lines
1222 bytes
public static IEnumerable<Control> AllControls(Control root)
{
  foreach (Control Child in root.Controls)
  {
    yield return Child;
    foreach (Control GrandChild in AllControls(Child))
      yield return GrandChild;
  }
}

// Damn, that's easy

-- 

programmer, author  http://www.midnightbeach.com
and father          http://www.midnightbeach.com/hs
Technical Details
Message-ID: <40FE138D.D0A0F368@midnightbeach.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,169d36351e297cad,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
Message-ID: <40FE138D.D0A0F368@midnightbeach.com>
Date: Tue, 20 Jul 2004 23:56:13 -0700
From: Jon Shemitz <jon@midnightbeach.com>
Reply-To: jon@midnightbeach.com
Organization: Midnight Beach
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en-US,en
MIME-Version: 1.0
Newsgroups: borland.public.csharpbuilder.language.csharp
Subject: C# 2.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 63.249.65.27
X-Trace: newsgroups.borland.com 1090392976 63.249.65.27 (20 Jul 2004 23:56:16 -0700)
Lines: 16
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail