Advertisement
csaki

throws TypeInitializationException

Nov 23rd, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. static List<int> unio(int[] t, int[] q)
  2.         {
  3.             List<int> l = new List<int>();
  4.             int segéd6;
  5.             if (t.Length > q.Length)
  6.             {
  7.                 segéd6 = t.Length;
  8.             }
  9.             else
  10.             {
  11.                 segéd6 = q.Length;
  12.             }
  13.  
  14.             for (int i = 0; i < segéd6; i++)
  15.             {
  16.                 l.Add(t[i]);
  17.                 l.Add(q[i]);
  18.             }
  19.  
  20.             for (int i = 0; i < l.Count; i++)
  21.             {
  22.                 for (int j = 0; j < l.Count; j++)
  23.                 {
  24.                     if (l[i] == l[j] && i != j)
  25.                     {
  26.                         if (i < j) l.RemoveAt(j);
  27.                         else l.RemoveAt(i);
  28.                     }
  29.  
  30.                 }
  31.             }
  32.             return l;
  33.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement