类、集合与可滚动控件编程指南
在编程的世界里,类、集合以及可滚动控件是非常重要的概念。下面将详细介绍它们的相关知识,包括集合的操作、学生集合应用程序的开发、对象浏览器的使用以及可滚动控件的运用。
1. 集合的操作与员工薪资计算
集合在编程中是一种重要的数据结构,它与数组有所不同。在计算员工薪资的示例中,我们可以看到集合的具体应用。以下是示例代码:
' Add each employee's hours pay rate to the
' payRates collection, with the employee
' ID number as the key.
payRates.Add(12.5, "55678")
payRates.Add(18.75, "78944")
payRates.Add(9.6, "84417")
' Compute and display each employee's
' gross pay.
For intIndex = 1 To employees.Count
' Get an employee ID number to use as a key.
strEmpNumber = empNumbers(intIndex).ToString()
' Get this employee's name.
strEmpName = employees.Item(strEmpNumber).ToString()
' Get the hours worked for this employee.
decHours = CDec(hoursWorked.I
类、集合与可滚动控件编程
超级会员免费看
订阅专栏 解锁全文
8

被折叠的 条评论
为什么被折叠?



