Dim FileINI As New clsFichiersINI("Test.ini") Dim int As Object = FileINI.TryToGetValueINI("Section1", "Int", TypeCode.Int32) Dim boll As Object = FileINI.TryToGetValueINI("Section1", "Boll", TypeCode.Boolean) Dim str As Object = FileINI.TryToGetValueINI("Section1", "Str",TypeCode.String)
Public Function TryToGetValueINI(ByVal section As String, ByVal key As String, ByVal VarType As TypeCode) ...... Return Convert.ChangeType(Value, vartype) ...... End Function
Private Sub Command1_Click()
MsgBox toto("blabla", vbString) '=== >> on passe un type
End Sub
Private Function toto(a As String, b As VbVarType ) ' on reçoit un type
MsgBox b
End Function
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question