'Visual Basic: Comma, ')',or valid expression continuation expected
I have the following function:
Public Function HasCurrencyChanged(ByVal idPriceList As Integer, ByVal data As Dictionary(Of String, String)) As Boolean
Dim param As ParamStruct() = New ParamStruct(2) {}
Try
param(0) = ProviderFactory.CreateParameter("@idPriceList", DbType.String, ParameterDirection.Input, idPriceList)
param(1) = ProviderFactory.CreateParameter("@ID", DbType.String, ParameterDirection.Input, data["uidIDCurrency"])
In my C# class i call this method as _clsPriceList.HasCurrencyChanged(Convert.ToInt32(priceListId), data);
In the last line i get a red line in data["uidIDCurrency"] telling me Comma, ')',or valid expression continuation expected
What is wrong?
Solution 1:[1]
It looks like you may have translated some C# but failed to do so completely. You don't use brackets, i.e. [], to index in VB but rather parentheses, i.e. (). You should have known that from any beginners VB tutorial or the like or even the rest of your own code that you posted.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user18387401 |
