Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. else
  2.  
  3.             {
  4.                 while (i < d.Length)
  5.                 {
  6.                     string current = "";
  7.                     for (int j = i; j < i + maxLength; j++)
  8.                     {
  9.                         if (j < d.Length)
  10.                         {
  11.                             // current += d[j];
  12.                             current = d.Substring(i, j - i + 1);
  13.  
  14.                             if (D.ContainsKey(current))
  15.                             {
  16.  
  17.                                 temp2 = D[current];
  18.                                 foreach (KeyValuePair<int, int> a in temp2)
  19.                                 {
  20.                                     if (a.Key >= first && a.Key <= last)
  21.                                         sum += a.Value;
  22.                                 }
  23.                             }
  24.                         }
  25.                         else break;
  26.                     }
  27.                     i++;
  28.                 }
  29.                 arr[s_i] = sum;
  30.                 s_i++;
  31.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement