Đang chuẩn bị liên kết để tải về tài liệu:
Professional C# Third Edition phần 3

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

System.Collections tên phản ánh khác của những sự mơ hồ thuật ngữ mà bệnh dịch hạch máy tính. Bộ sưu tập thường được sử dụng chính thức để chỉ bất kỳ cấu trúc dữ liệu. Tuy nhiên, nó cũng có ý nghĩa cụ thể của một lớp mà thực hiện IEnumerable ICollection một loại đặc biệt của cấu trúc dữ liệu mà chúng tôi sẽ điều tra sau trong chương này. | Chapter 9 -----Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com With the exception of the basic System.Array all the data structure classes are located in the System. Collections namespace. The name System.Collections reflects another of those terminology ambiguities that plague computing. Collection is often used informally to denote any data structure. However it also has the more specific meaning of a class that implements lEnumerable or iCollection a particular type of data structure that we will investigate later in this chapter. In this chapter we will always use the term collection to refer to the more specific meaning except where .NET base class names force us to use it in the general sense. Array Lists An array list is very similar to an array except that it has the ability to grow. It is represented by the class System.Collections.ArrayList. The ArrayList class also has some similarities with the StringBuilder class. Just as a StringBuilder allocates enough space in memory to store a certain number of characters and allows you to manipulate characters within the space the ArrayList allocates enough memory to store a certain number of object references. You can then efficiently manipulate these object references . If you try to add more objects to the ArrayList than permitted then it will automatically increase its capacity by allocating a new area of memory big enough to hold twice as many elements as the current capacity and relocate the objects to this new location. You can instantiate an array list by indicating the initial capacity you want. For this example we will assume we are creating a list of Vectors ArrayList vectors new ArrayList 20 If you don t specify the initial size it defaults to 16 ArrayList vectors new ArrayList capacity of 16 You can then add elements using the Add method vectors.Add new Vector 2 2 2 vectors.Add new Vector 3 5 6 The ArrayList treats all its elements as object references. That means you can store

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.