Results 1 to 3 of 3

Thread: Code conversion from VB.NET to vb6.0

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2012
    Posts
    58

    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

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,102

    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

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2012
    Posts
    58

    Re: Code conversion from VB.NET to vb6.0

    Quote Originally Posted by Shaggy Hiker View Post
    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
  •  



Click Here to Expand Forum to Full Width