摘要:
.NET Framework 4Other Versions5 out of 10 rated this helpful-Rate this topicRepresents a non-generic collection of objects that can be individually accessed by index.Namespace:System.CollectionsAssembly:mscorlib(in mscorlib.dll)SyntaxC#C++F#VB[ComVisibleAttribute(true)]public interface IList : IColl 阅读全文
摘要:
AListcan be searched imperatively. This often involves a foreach-loop. It can be searched instead with theFindmethod: this often uses a lambda expression. Find makes code clearer in some program contexts. It sometimes makes maintenance easier.ExampleInstead of using a foreach-loop with an if stateme 阅读全文
摘要:
Lists and arrays implementIList. This interface is an abstraction that allows list types to be used with through a single reference type. With it, we can create a single method to receive an int[] or a List<int>.ExampleFirst, with the IList generic interface, you must specify a type parameter. 阅读全文