🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indexed properties

#94
From: Marc Rohloff TeamB
Date: Fri, 07 Apr 2006 22:42
18 lines
1624 bytes
On 7 Apr 2006 03:01:54 -0700, Murdoc wrote:

> So only initialize the collection instance if it is necessary.
> 
> public void add(Object o)
> {
>     if (_collection == null)
>         _collection = new Collection();
> 
>     _collection.add(o);
> }

You could also do this in the property which retrieves your collection
object.

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <1sewcl5nubmpn.dlg@dlg.marcrohloff.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <442dc6a5$1@newsgroups.borland.com> <442e3f8a$1@newsgroups.borland.com> <1gx6nf1imch9z$.dlg@dlg.marcrohloff.com> <44363557$1@newsgroups.borland.com> <xn0ekpeax9w6l000@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,8168306bbf9f2550
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: Indexed properties
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <442dc6a5$1@newsgroups.borland.com> <442e3f8a$1@newsgroups.borland.com> <1gx6nf1imch9z$.dlg@dlg.marcrohloff.com> <44363557$1@newsgroups.borland.com> <xn0ekpeax9w6l000@newsgroups.borland.com>
Date: Fri, 7 Apr 2006 18:42:08 -0400
Message-ID: <1sewcl5nubmpn.dlg@dlg.marcrohloff.com>
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
X-Antivirus: avast! (VPS 0614-3, 04/07/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 65.31.1.121
X-Trace: newsgroups.borland.com 1144449725 65.31.1.121 (7 Apr 2006 15:42:05 -0700)
Lines: 18
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail