List和IList之间的区别 [英] Difference between List and IList

查看:90
本文介绍了List和IList之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,



我是初学者,我希望通过以下问题了解,



List和IList有什么区别,哪一个有更好的性能,何时使用List over IList,反之亦然?



谢谢你的帮助。



问候

Enos

Good Day,

I am a beginner and i want to get an understanding from the question below,

What is the difference between List and IList, which one has better performance and when to use List over IList and vice versa?

Thank you for your help.

Regards
Enos

推荐答案

您好,请看下面的链接:



列表与IList [< a href =http://forums.asp.net/t/1231995.aspx/1target =_ blanktitle =New Window> ^ ]

何时使用IList和何时使用列表 [ ^ ]

列表与IList C# [ ^ ]

其他参考资料 - Google [ ^ ]



希望它有所帮助! :)
Hi, See the links below:

List vs IList[^]
When to use IList and When to use List[^]
List vs IList C#[^]
Other References - Google[^]

Hope it helps! :)


列表是一个类,

IList是一个接口



你无法明确创建一个IList,但你可以创建从接口继承的各种类。

我建议你使用Google Interfaces和Classes,以便更好地理解它们。
List is an class,
IList is an interface

You cannot explicitly create an IList, but you can create various classes that inherit from interfaces.
I suggest you Google Interfaces and Classes so you can understand the difference better.


这篇关于List和IList之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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