Dim gks() As String = {"rep","cou","sta","cit","key","quoid","soid"}
Dim dic As new Dictionary(Of String, String)
For i As Integer = 0 To gks.Length - 1
If dic.ContainsKey(gks(i)) = False Then
dic.Add(gks(i), 0)
End If
dic(gks(i)) = IIF(e.GetValues(gks(i)) = "",e.PostValues(gks(i)),e.GetValues(gks(i)))
Next
需要引用,就改成 dic("cou") 等。