TAILIEUCHUNG - Using Indexers in a Windows Application

Sử dụng Indexers trong một ứng dụng Windows Trong bài tập sau đây, bạn sẽ kiểm tra một ứng dụng điện thoại đơn giản và hoàn thành cuốn sách thực hiện. Nhiệm vụ của bạn sẽ được để viết hai indexers trong lớp danh bạ | Using Indexers in a Windows Application In the following exercise you will examine a simple phone book application and complete its implementation. Your task will be to write two indexers in the PhoneBook class one that accepts a Name parameter and returns a PhoneNumber and another that accepts a PhoneNumber parameter and returns a Name. The Name and PhoneNumber structs have already been written. You will also need to call these indexers from the correct places in the program. Familiarize yourself with the application 1. Start Microsoft Visual Studio 2005. 2. Open the Indexers project located in the Microsoft Press Visual CSharp Step by Step Chapter 15 Indexers folder in your My Documents folder. This is a Microsoft Windows Forms application. 3. On the Debug menu click Start Without Debugging. The project builds and runs. A form displays two empty text boxes labeled Name and Phone Number. The form also contains three buttons one to add a name phone number pair to a list of names and phone numbers held by the application one to find a phone number when given a name and one to find a name when given a phone number. These buttons currently do nothing. Your task is to finish the application so that these buttons work. 4. Close the form and return to Visual Studio 2005. 5. Display the source file in the Code and Text Editor window. Examine the Name struct. Its purpose is to act as a holder for names. The name is provided as a string to the constructor. The name can be retrieved by using the read-only string property called Text. The Equals and GetHashCode methods are used for comparing Names when searching through an array of Name values you can ignore them for the time being. 6. Display the source file in the Code and Text Editor window and examine the PhoneNumber struct. It is very similar to the Name struct. 7. Display the source file in the Code and Text Editor window and examine the PhoneBook class. This class contains two .

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.