title: c# number sequence
body: <p>I have made this code to get from 2a3b to aabbb. This also has to apply when no numbers are given. Like aa2b => aabb.
  The program is fully working but my problem is, it takes in alot of space. I think it is my split but my array will be like this if the input is 2a2b:</p>
  
  <p>2
  NULL
  NULL
  a
  2
  NULL
  NULL
  b       </p>
  
  <p>Does someone know what i'm doing wrong? Is it my split?</p>
  
  <pre><code>static void Main(string[] args)
          {
              string test = "";
              int intNumber = 1;
  
              string value = "2a2b";
              string[] array = new string[20];
              int count = 1;
  
              array = Regex.Split(value, "(\\d{0,2})");
  
              while (count &lt; array.Length)
              {
                  int num;
                  if (array[count] != "")
                  {
                      bool isNumeric = int.TryParse(array[count], out num);
                      if (!isNumeric)
                      {
  
                          test = test + string.fill(array[count], intNumber);
                          test = test + array[count];
  
                          Console.WriteLine(test);
  
                          intNumber = 1;
                      }
                      else
                      {
                          intNumber = num;
  
                      }  
                  }
                  count++;
              }
              Console.WriteLine("woord:" + test);
  
  
              Console.ReadLine();
  </code></pre>