Code conversion from VB.NET to vb6.0
Can someone convert the following VB.net code to VB6.0 ?
Dim result As String = rqd.Request("0", "", "")
For i = 0 To rqd.get_Total_Sales '
Dim UID As String = rqd.get_UID(i) '
Dim InRows As List(Of String()) = New List(Of String())()
InRows.add(
rqd.get_DetailsQuantity(i, j),
rqd.get_DetailsGrossValue(i, j),
)
Next
'
Next
Re: Code conversion from VB.NET to vb6.0
What type is rqd? It looks like it might be somebodies custom class, in which case there may be no straightforward conversion between the two, as you'd have to decide what is the most appropriate replacement for that functionality.
Unless you are using RC6, the closest analogue to InRows would be an array of arrays of string. From the code shown, there is no reason why they used a List rather than just an array of arrays, so if that's all the code where InRows is used, then the conversion of that should be pretty simple, but that seems unlikely. After all, why fill a collection and then never do anything with it? So, you might look at every other use of InRows. Is Add or Remove ever called on that object? If neither is ever called, then there wasn't a real point in using InRows in the first place.
Re: Code conversion from VB.NET to vb6.0
Quote:
Originally Posted by
Shaggy Hiker
What type is rqd? It looks like it might be somebodies custom class, in which case there may be no straightforward conversion between the two, as you'd have to decide what is the most appropriate replacement for that functionality.
Unless you are using RC6, the closest analogue to InRows would be an array of arrays of string. From the code shown, there is no reason why they used a List rather than just an array of arrays, so if that's all the code where InRows is used, then the conversion of that should be pretty simple, but that seems unlikely. After all, why fill a collection and then never do anything with it? So, you might look at every other use of InRows. Is Add or Remove ever called on that object? If neither is ever called, then there wasn't a real point in using InRows in the first place.
Thank you very much for your help