Method params match signature, but still getting error
- by Jason
I am in the midst of converting a VB library to C#. One of my methods has the following signature in VB:
Private Shared Sub FillOrder(ByVal row As DataRowView, ByRef o As Order)
In C# I converted it to:
private static void FillOrder(DataRowView row, ref Order o)
From my constructor inside my Order class, I am calling the FillOrder() method like so:
DataView dv = //[get the data]
if (dv.Count > 0)
{
FillOrder(dv[0], this);
}
In VB, this works:
Dim dv As DataView = '[get data]'
If dv.Count > 0 Then
FillOrder(dv.Item(0), Me)
End If
However, in VS10 in the C# file I am getting a red squiggle under this call with the following error:
The best overloaded method match for [the method] has some invalid arguments
This was working code in VB. What am I doing wrong?