接口IClass:什么是接口? [英] IClass for Interface: what's an interface?

查看:85
本文介绍了接口IClass:什么是接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Aren不是所有类接口都是?


什么构成接口(和它一起使用,I前缀

区别)?


Zytan

解决方案




Zytan < zy ********** @ yahoo.comwrote in message

news:11 ******************** **@a75g2000cwd.googlegr oups.com ...


Aren都不是所有类接口?



所有类都定义(至少)一个接口。但它们不一样。


什么构成一个界面(和它一起,我前缀

的区别)?



接口是合约。这意味着任何实现它的类都必须实现在其中声明的所有成员。


在depht解释中更好地了解MSDN


不是所有类都接口?


>

所有类定义(至少)一个接口。但他们不一样。



你的意思是,界面这个词有两个含义?


什么构成一个界面(和它一起,我前缀

区别)?



接口是合约。这意味着任何实现它的类都必须实现在其中声明的所有成员。



很遗憾,对此一无所知,我根本不会这样做。

你在谈论继承吗?


在depht解释中查看MSDN以获得更好的解释



我试过,但是有很多接口在MSDN中,很难找到

的简单解释。我想我将不得不深入了解一下

一般。我发现MSDN(大多数)非常无用,除非作为参考。

也就是说,除非他们已经知道,否则它没有帮助。

这是一个特殊的已知的问题帮助人员应该修复

for v2005。


Zytan


< blockquote> 2007年2月28日13:35:34 -0800,Zytan < zy ********** @ yahoo.comwrote:


>不是所有的课程都接口吗?
区别)?

Zytan



An interface是一个类(或结构)。它包含方法,属性,

索引器或事件。它不提供任何

方法的实现。


接口的优点是任何其他类(或接口)

可以继承 (或实现)该接口。它是C#的方式来获得类似于C ++中的多重继承的
。任何

实现接口的类必须提供

接口中指定的所有成员。


rossum


Aren''t all classes interfaces?

What constitutes an interface (and with it, the "I" prefix
distinction)?

Zytan

解决方案

Hi,

"Zytan" <zy**********@yahoo.comwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...

Aren''t all classes interfaces?

All classes define (at least) one interface. But they are not the same.

What constitutes an interface (and with it, the "I" prefix
distinction)?

An interface is a contract. It means that any class that implement it has to
implement all the members declared in it.

Take a look at MSDN for a better more in depht explanation


Aren''t all classes interfaces?

>
All classes define (at least) one interface. But they are not the same.

You mean, the word ''interface'' has two meanings?

What constitutes an interface (and with it, the "I" prefix
distinction)?


An interface is a contract. It means that any class that implement it has to
implement all the members declared in it.

Unfortunately, knowing nothing about it, I don''t follow this at all.
Are you talking about inheritance?

Take a look at MSDN for a better more in depht explanation

I tried, but there are so many interfaces in MSDN, it''s hard to find a
simple explanation. I guess I''ll have to dig in and read about one in
general. I find MSDN (mostly) very useless except as a reference.
That is, it doesn''t help someone unless they sort of already know.
This was a particular known problem the help guys were supposed to fix
for v2005.

Zytan


On 28 Feb 2007 13:35:34 -0800, "Zytan" <zy**********@yahoo.comwrote:

>Aren''t all classes interfaces?

What constitutes an interface (and with it, the "I" prefix
distinction)?

Zytan

An interface is a class (or struct). It contains methods, properties,
indexers or events. It does not provide implementations for any of
its methods.

The advantage of an interface is that any other class (or interface)
can "inherit" (or implement) that interface. It is the C# way to get
something similar to multiple inheritance in C++. Any class that
implements an interface must supply all the members specified in the
interface.

rossum


这篇关于接口IClass:什么是接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆