Đang chuẩn bị liên kết để tải về tài liệu:
Pro VB 2005 and the .NET 2.0 Platform Second Edition phần 4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

các nhà phát triển để áp dụng hàng chục refactorings mã sử dụng Visual Studio 2005. Hãy suy nghĩ của Vil như một "anh lớn" thân thiện cho các nhà phát triển NET Công cụ này sẽ phân tích mã NET của bạn và cung cấp các ý kiến khác nhau để làm thế nào để cải thiện mã của bạn thông qua tái cấu trúc, cấu trúc xử lý ngoại lệ, và vv. | CHAPTER 9 WORKING WITH INTERFACES AND COLLECTIONS 279 Source Code The CollectionTypes project can be found under the Chapter 9 subdirectory. System.Collections.Specialized Namespace In addition to the types defined within the System.Collections namespace you should also be aware that the .NET base class libraries provide the System.Collections.Specialized namespace which defines another set of types that are more pardon the redundancy specialized. For example the StringDictionary and ListDictionary types each provide a stylized implementation of the IDictionary interface. Table 9-5 documents the key class types. Table 9-5. Types of the System.Collections.Specialized Namespace Member of System.Collections.Specialized Meaning in Life CollectionsUtil HybridDictionary Creates collections that ignore the case in strings. Implements IDictionary by using a ListDictionary while the collection is small and then switching to a Hashtable when the collection gets large. ListDictionary Implements IDictionary using a singly linked list. Recommended for collections that typically contain ten items or fewer. NameValueCollection Represents a sorted collection of associated String keys and String values that can be accessed either with the key or with the index. StringCollection StringDictionary Represents a collection of strings. Implements a hashtable with the key strongly typed to be a string rather than an object. StringEnumerator Supports a simple iteration over a StringCollection. Summary An interface can be defined as a named collection of abstract members. Because an interface does not provide any implementation details it is common to regard an interface as a behavior that may be supported by a given type. When two or more classes implement the same interface you are able to treat each type the same way via interface-based polymorphism even if the types are defined within unique class hierarchies. VB 2005 provides the Interface keyword to allow you to define a new .