窗体上有两个名称分别为Text1、Text2的文本框,一个名称为Command1的命令按钮。设有如下的类型声明:
A. Private Sub Command1_Click() Dim p As Person p. name=Text1. Text p. major=Text2. Text Open"C:\data. dat" For Random As #1 Put #1, 1, p Close #1 End Sub
B. Private Sub Command1_Click() Dim p As Person p. name=Text1.Text p. major=Text2. Text Open"C:\data. dat" For Random As #1 Get #1, 1, p Close #1 End Sub
C. Private Sub Command1_Click() Dis p As Person p. name=Text1. Text p. major=Text2. Text open "C:\data. dat" For Random As #1 Len=Len(p) Put #1, 1, p Close #1 End Sub
D. Private Sub Command1_Click() Dim p As Person p. name=Text1. Text p. major=Text2. Text Open "C:\data. dat" For Random As #1=Len(p) Get #1, 1, p Close #1 End Sub