CorstianBoerman

Jagged Array with IndexOutOfRangeException

Aug 23rd, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1.         static string[][] GetData(string url, string text)
  2.         {
  3.             string Data = ReadPage(url);
  4.             string[] result;
  5.  
  6.             result = Regex.Split(Data, text);
  7.  
  8.             string[][] duo = new string[][] {};
  9.  
  10.             int i = 0;
  11.             foreach (string res in result)
  12.             {
  13.                 if (i >= 1)
  14.                 {
  15.                     string[] uno = Split(res);
  16.                     duo[i] = uno;
  17.                     i++;
  18.                 }
  19.                 else
  20.                 {
  21.                     i++;
  22.                 }
  23.             }
  24.            
  25.             return duo;
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment