🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: C# FindComponent()

#482
From: Marc Rohloff TeamB
Date: Sat, 22 Jan 2005 01:44
19 lines
1563 bytes
On Fri, 21 Jan 2005 19:50:31 -0500, L Hill wrote:

> I think i just made one unless there is a better option:
You probably want to do:

private Control FindControl(string ctrl)
{
   foreach (Control control in Controls)
      if (ctrl == control.Name)
        return control;
   return null;
 }
 
Which is slightly more efficient. However this works with controls not
components.

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <qqqmx482ps5g.dlg@marcrohloff.40tude.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41f19e6d$1@newsgroups.borland.com> <41f1a34d@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,4151d34871fb2178
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: C# FindComponent()
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.14.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <41f19e6d$1@newsgroups.borland.com> <41f1a34d@newsgroups.borland.com>
Date: Fri, 21 Jan 2005 20:44:51 -0500
Message-ID: <qqqmx482ps5g.dlg@marcrohloff.40tude.net>
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
NNTP-Posting-Host: 4.224.231.92
X-Trace: newsgroups.borland.com 1106358164 4.224.231.92 (21 Jan 2005 17:42:44 -0800)
Lines: 19
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail