tailieunhanh - Mastering Microsoft Visual Basic 2008 phần 10

bảng biểu, và thiết lập mối quan hệ giữa chúng. Và chỉ sau đó chúng ta có thể mã chống lại cơ sở dữ liệu. Không có gì lạ để thêm một bảng vào một cơ sở dữ liệu hiện có ở giai đoạn sau, nhưng điều này cho thấy một số lỗ hổng trong thiết kế cơ sở dữ liệu ban đầu. | 1000 appendix a the bottom line Use arrays. Arrays are structures for storing sets of data as opposed to single-valued variables. Master It How would you declare an array for storing 12 names and another one for storing 100 names and Social Security numbers Solution The first array stores a set of single-valued data names and it has a single dimension. Because the indexing of the array s elements starts at 0 the last element s index for the first array is 11 and it must be declared as Dim Names 11 As String The second array stores a set of pair values names and SSNs and it must be declared as a two-dimensional array Dim Persons 99 1 As String Chapter 3 Programming Fundamentals Use Visual Basic s flow-control statements. Visual Basic provides several statements for controlling the sequence in which statements are executed decision statements which change the course of execution based on the outcome of a comparison and loop statements which repeat a number of statements while a condition is true or false. Master It Explain briefly the decision statements of Visual Basic. Solution The basic decision statement in VB is the If. End If statement which executes the statements between the If and End If keywords if the condition specified in the If part is True. A variation of this statement is the If. .Then. .Else. .End If statements. If the same expression must be compared to multiple values and the program should execute different statements depending on the outcome of the comparison use the Select Case statement. Write subroutines and functions. To manage large applications we break our code into small manageable units. These units of code are the subroutines and functions. Subroutines perform actions and don t return any values. Functions on the other hand perform calculations and return values. Most of the language s built-in functionality is in the form of functions. Master It How will you create multiple overloaded forms of the same function Solution Overloaded .

TỪ KHÓA LIÊN QUAN