[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Interface to a namespace or a class

Marco Shaw [MVP]

5/26/2008 2:54:00 AM

I'm just wondering if a "public interface" would be something associated
with a namespace and/or a class?

Marco
4 Answers

Peter Duniho

5/26/2008 3:42:00 AM

0

On Sun, 25 May 2008 19:54:02 -0700, Marco Shaw [MVP]
<marco.shaw@_NO_SPAM_gmail.com> wrote:

> I'm just wondering if a "public interface" would be something associated
> with a namespace and/or a class?

Impossible to answer without more context. However, in .NET an
"interface" is something completely different from a namespace or a class,
even as they are "associated" with those things (interfaces and classes
both exist within a namespace, and a class implements an interface).

If you're not talking about a .NET interface, then who knows. It might
be. It might not be.

Pete

ssg31415926

5/26/2008 7:39:00 AM

0

You can see an interface as a contract that a class must meet: it
defines the methods, including the parameters and return values. For
a class to implement an interface it must implement all of the defined
methods exactly as defined. However, an interface is not limiting in
that a class can define other methods or the same methods with other
signatures.

On May 26, 4:42 am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> On Sun, 25 May 2008 19:54:02 -0700, Marco Shaw [MVP]
>
> <marco.shaw@_NO_SPAM_gmail.com> wrote:
> > I'm just wondering if a "public interface" would be something associated
> > with a namespace and/or a class?
>
> Impossible to answer without more context. However, in .NET an
> "interface" is something completely different from a namespace or a class,
> even as they are "associated" with those things (interfaces and classes
> both exist within a namespace, and a class implements an interface).
>
> If you're not talking about a .NET interface, then who knows. It might
> be. It might not be.
>
> Pete

Peter Duniho

5/26/2008 8:48:00 AM

0

On Mon, 26 May 2008 00:39:03 -0700, ssg31415926 <newsjunkmail@gmail.com>
wrote:

> You can see an interface as a contract that a class must meet: it
> defines the methods, including the parameters and return values. For
> a class to implement an interface it must implement all of the defined
> methods exactly as defined. However, an interface is not limiting in
> that a class can define other methods or the same methods with other
> signatures.

All that is true for interfaces in .NET. However, since we don't know the
context of the OP's question, there's no way to know whether that's the
kind of "public interface" that he's talking about.

ssg31415926

5/26/2008 9:07:00 AM

0

Granted. I should've clarified that I was expanding on your .NET
definition. Marco is active in the PowerShell group so I'm
guessing .NET is what he's interested in.

On May 26, 9:48 am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
> On Mon, 26 May 2008 00:39:03 -0700, ssg31415926 <newsjunkm...@gmail.com>
> wrote:
>
> > You can see an interface as a contract that a class must meet: it
> > defines the methods, including the parameters and return values. For
> > a class to implement an interface it must implement all of the defined
> > methods exactly as defined. However, an interface is not limiting in
> > that a class can define other methods or the same methods with other
> > signatures.
>
> All that is true for interfaces in .NET. However, since we don't know the
> context of the OP's question, there's no way to know whether that's the
> kind of "public interface" that he's talking about.