🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Interface querying and dotNet/C# interfaces

#657
From: Barry Mossman
Date: Thu, 16 Sep 2004 13:43
25 lines
1426 bytes
"Theo Bebekis" <teo@thinx.gr> wrote in message
news:41496a14$1@newsgroups.borland.com...
> Hi
>
> Is there any such notion to dotNet interfaces.
> I know that interface querying works in Delphi's interfaces because of
the
> presence of the GUID and no GUIDs in dotNEt.

Yes C# does have interfaces.

public interface IMyInterface {
    // properties
    // methods
    // events
}

Also has
if (myObject is IMyInterface) {
    // do something
}

A class can implement multiple interfaces

Barry Mossman
Technical Details
Message-ID: <41499898@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41496a14$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,4972df4d3d933b7c
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Barry Mossman" <BarryMossmanNOSPAM@hotmail.com>
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <41496a14$1@newsgroups.borland.com>
Subject: Re: Interface querying and dotNet/C# interfaces
Date: Thu, 16 Sep 2004 23:43:46 +1000
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 144.138.109.219
Message-ID: <41499898@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095342232 144.138.109.219 (16 Sep 2004 06:43:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail