Lập trình C# từ cơ bản đến nâng cao part 6

Tham khảo tài liệu 'lập trình c# từ cơ bản đến nâng cao part 6', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | phoneNumber br ReadUInt64 fullName address - br Readlnt32 type organization class PhoneBook I ArrayList data new ArrayListO dynamic array of objects public Phone this int i indexer get 1 if -1 i i return Phone data i else throw new IndexOutOfRangeException Index out of range set if -1 i i change a phone data i value else if i -- add new phone value else throw new IndexOutOfRangeException Index out of range public void Clear 125 public void Delete int index Í if -1 index index f index Done else throw new IndexOutOfRangeException Nothing to delete public void Edit int index if -1 index ÍÍ index 1 this index .DisplayO this index . Input Done else throw new IndexOutOfRangeException Nothing to edit public void Search string name int found 0 int indexArray new int store indexes of phones that matches the search condition int j 0 for int 1 0 1 1 if this i . 0 126 found indexArrayi j i if found C Found phone s 0 found for int k 0 k found k Index of the phone info 0 indexArray- k Console. rd rice Line this indexArrayt k . ToStringO Ị else Not found public void Search ulong phoneNumber i for int 1 0 i i if this i .PhoneNumber phpneNumber Console .WriteLine Index of the phone info 0 i this ij .ToString0 return Not found public int Count get return .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
10    65    2    26-04-2024
103    133    3    26-04-2024
Đã 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.