61、类、集合与可滚动控件编程指南

类、集合与可滚动控件编程

类、集合与可滚动控件编程指南

在编程的世界里,类、集合以及可滚动控件是非常重要的概念。下面将详细介绍它们的相关知识,包括集合的操作、学生集合应用程序的开发、对象浏览器的使用以及可滚动控件的运用。

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值