1 / 9

Mastering Collections in Windows Database Applications: Chapter 11 Overview

This chapter focuses on understanding collections in Windows database applications. It begins with the declaration and referencing of collections, followed by an in-depth look at various collection types and data structures. Key concepts include object collections, the use of list boxes to manipulate item collections, stacks, and queues for data organization, and hash tables for efficient item retrieval and storage. Practical examples illustrate adding, removing, and iterating over collection items, providing learners with a comprehensive understanding of how to utilize collections effectively within their applications.

ermin
Télécharger la présentation

Mastering Collections in Windows Database Applications: Chapter 11 Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows Database Applications CIS 341 Chapter 11

  2. Objectives • Declare and reference collections • Collection types • Data Structures • Object collection • Items collection of a list box

  3. Referencing Collection Items DsStoreSales1.Tables(“Stores”) DsStoreSales1.Tables(0)

  4. Collection Class

  5. Stacks mstkList.Push(strItem) strItem = mstkList.Peek() mstkList.Pop()

  6. Queue mqueList.Enqueue(strItem) strItem = mqueList.Peek() mqueList.Dequeue()

  7. Hash Tables Strkey = strItem.GetHashCode.ToString() mhshTable.Add(strKey, strItem) strItem = lstLanguages.SelectedItem.ToString() strKey = strItem.GetHashCode mhshTable.Remove(strKey) For Each strItem In mhshTable.Values lstLanguages.Items.Add(strItem) Next

  8. Sorted List strKey = strItem.Substring(0,3) msrtList.Add(strKey, strItem) lstLanguages.Items.Clear() For each strItem in msrtList.Values lstLanguages.Items.Add(strItem) Next

  9. Collection of Objects Dim objStudent As New Student(txtName.Text, CDec(txtGPA.Text)) mcolStudents.Add(strKey, objStudent) objStudent = CType(mcolStudents.Item(strKey), Student)

More Related