Advertisement

10.05.2007 at 04:41AM PDT, ID: 22874461
[x]
Attachment Details

Structure in vb.net

Asked by anusdesai in .NET Framework 2.0, Visual Studio .NET 2005

Tags: structure, vb

Hi,
How do i convert this code from vb 6.0 to vb.net

Type AutoRunDetails
    Name As String
    doControls As Boolean
    ReportTotal As Integer
    ReportType(1 To 20) As String
    ReportName(1 To 20) As String
End Type

Also how do add values in it


example vb 6.0
    RunDetails(BatchNo).ReportType(RptCount) = "RI"

but if i do the same in vb.net
by:
Structure AutoRunDetails
            Dim Name As String
            Dim doControls As Boolean
            Dim ReportTotal As Short
            <VBFixedArray(20)> Dim ReportType() As String
            <VBFixedArray(20)> Dim ReportName() As String            
            Public Sub Initialize()
            ReDim ReportType(20)
            ReDim ReportName(20)
            End Sub
      End Structure
code:
      RunDetails(BatchNo).ReportType(RptCount) = "RI"

i get error object not set to reference
Start Free Trial
[+][-]10.05.2007 at 04:50AM PDT, ID: 20021030

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.05.2007 at 04:58AM PDT, ID: 20021065

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.05.2007 at 05:31AM PDT, ID: 20021261

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.05.2007 at 05:37AM PDT, ID: 20021299

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 2.0, Visual Studio .NET 2005
Tags: structure, vb
Sign Up Now!
Solution Provided By: TimCottee
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628