🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Property from C# to Delphi.NET

#290
From: yc
Date: Tue, 17 Jan 2006 13:47
33 lines
1650 bytes
Hi,
I hope this is the right group.
I've a C# class with the property and implemented interface stuff.
I need to convert to Delphi.NET, but somehow, I am getting confused implementing the same properties (Item) for different interfaces.

public class TestClass : CollectionBase, DataParameterCollection,  IDisposable
{
  public MyParameter this[String pParamName] {
     get {
         int index = IndexOf(pParamName);
         if( index < 0 )
           return null;
         else
           return InnerList[index] as MyParameter;
     }
     set {
          throw new NotSupportedException();
     }
  }

  Object IDataParameterCollection.this[String pParamName] {
     get {
         return this[pParamName];
     }
     set {
         this[pParamName] = value as MyParameter;
     }
}

 
Thanks in advance
yc
Technical Details
Message-ID: <43cd039c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,10f5c948f547b36a,start
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "yc" <yc@yc.yc>
Sender: "yc" <yc@yc.yc>
Reply-To: "yc" <yc@yc.yc>
Subject: Property from C# to Delphi.NET
Newsgroups: borland.public.csharpbuilder.language.csharp
X-User-Info: 85.158.96.2     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <43cd039c$1@newsgroups.borland.com>
Date: 17 Jan 2006 06:47:56 -0700
X-Trace: newsgroups.borland.com 1137509276 207.105.83.66 (17 Jan 2006 06:47:56 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail