code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| Module result
Private pin1 As String
Private pin2 As String
Public Function setValue(ByVal pin As String, ByVal i As Integer)
If i = 0 Then pin1 = pin Else pin2 = pin
End Function
Public Function getvalue(ByVal i As Integer) As String
If i = 0 Then getvalue = pin1 Else getvalue = pin2
End Function
End Module |
Ik heb geprobeerd met string .
code:
1
2
3
| result.setValue("0",1)
dim keuze as string
keuze = result.getValue(1) |
Het komt een foutmelding InvalidCastExecption .
Maar bij vb6 is er geen probleem ..
dit code was bestemd voor .Net Framework Compact
waarom?