Results 1 to 5 of 5

Thread: String[] [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    String[] [RESOLVED]

    Howdy all,


    I am having a problem accessing the values of a string[] array;

    Code:
    //remove the leading spaces
    					line = line.TrimStart(new char[] {' '});
    					//Console.WriteLine(line);
    					//find the parts to the line..
    					line2 = line.Split(new char[] { ',' });
    					//we now have, the parts to the line..
    					left = line2[0].Split(new char[] { ' ' });
    					//get the right side..
    					right = line2[1];
    It generates an Index was outside the bounds of an array error on the line:

    Code:
    right = line2[1];
    Anyone know why?


    Phreak
    Last edited by «°°phReAk°°»; Feb 12th, 2004 at 12:33 AM.

    Visual Studio 6, Visual Studio.NET 2005, MASM

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