Advertisement

05.12.2008 at 12:12PM PDT, ID: 23395607
[x]
Attachment Details

Index was outside the bounds of the array

Asked by jitganguly in Visual Studio .NET 2005, Microsoft Visual Basic.Net, .Net Editors & IDEs

Tags: Microsoft, .net

Hi,
I am getting 'Index was outside the bounds of the array' in  the following  line

 Select Case (args(iArgIndex))

Here is my code, it is VB.net Colsole application

Shared Function main(ByVal args() As String) As Integer
            Dim iArgIndex As Integer = 1

            Select Case (args(iArgIndex))
                Case 10
                Case 20
                Case 30
                Case 40
                Case 50 'Interface

                    Dim startInfo As System.Diagnostics.ProcessStartInfo
                    Dim pStart As New System.Diagnostics.Process

                    startInfo = New System.Diagnostics.ProcessStartInfo("Somexe")

                    pStart.StartInfo = startInfo
                    pStart.Start()
                    pStart.WaitForExit() 'Your code will halt until the exe file has executed.
                Case 60 'exports
                Case 70 'reports

            End Select

        End Function
Start Free Trial
[+][-]05.12.2008 at 12:19PM PDT, ID: 21549735

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.

 
[+][-]05.12.2008 at 12:21PM PDT, ID: 21549754

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.

 
[+][-]05.12.2008 at 12:21PM PDT, ID: 21549755

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.

 
[+][-]05.12.2008 at 12:22PM PDT, ID: 21549762

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.

 
[+][-]05.12.2008 at 12:26PM PDT, ID: 21549794

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.

 
[+][-]05.12.2008 at 12:27PM PDT, ID: 21549808

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.

 
[+][-]05.12.2008 at 01:09PM PDT, ID: 21550130

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.

 
[+][-]05.12.2008 at 01:25PM PDT, ID: 21550229

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: Visual Studio .NET 2005, Microsoft Visual Basic.Net, .Net Editors & IDEs
Tags: Microsoft, .net
Sign Up Now!
Solution Provided By: jaime_olivares
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628