|
-
Mar 27th, 2022, 10:17 AM
#1
Thread Starter
Member
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
-
Mar 27th, 2022, 11:11 AM
#2
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.
My usual boring signature: Nothing
 
-
Mar 28th, 2022, 03:44 AM
#3
Thread Starter
Member
Re: Code conversion from VB.NET to vb6.0
 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
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|