G
Guest
I have just tried to pass parameters to a procedure in VB 2005 and realised
that you only need to pass the input parameter. The output parameter's value
will be returned without the need to pass it as was the case in the previous
version of VB e.g. VB .Net 2003.
Here's the procedure in the web service:
Public Sub Convert2Dollar(ByVal euroAmount As Double, ByRef usDollarAmount
As Double)
Dim exchangeRate As Double
exchangeRate = 10 / 6
usDollarAmount = euroAmount * exchangeRate
End Sub
Here's how i passed an input parameter in a button's click procedure (and it
worked!!):
Dim myEuro As Double
myEuro = CDbl(txtEuro.Text)
Dim objConverter As New localhost.Service
lblDollar.Text = CStr(objConverter.Convert2Dollar(myEuro))
Does anyone know why this should work..?
that you only need to pass the input parameter. The output parameter's value
will be returned without the need to pass it as was the case in the previous
version of VB e.g. VB .Net 2003.
Here's the procedure in the web service:
Public Sub Convert2Dollar(ByVal euroAmount As Double, ByRef usDollarAmount
As Double)
Dim exchangeRate As Double
exchangeRate = 10 / 6
usDollarAmount = euroAmount * exchangeRate
End Sub
Here's how i passed an input parameter in a button's click procedure (and it
worked!!):
Dim myEuro As Double
myEuro = CDbl(txtEuro.Text)
Dim objConverter As New localhost.Service
lblDollar.Text = CStr(objConverter.Convert2Dollar(myEuro))
Does anyone know why this should work..?