Advertisement
OedipusPrime

Untitled

Feb 19th, 2013
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. public static List<int> GetEvenNumbers(this List<int> nums)
  2. {
  3.     List<int> nums2 = new List<int>();
  4.  
  5.         for (int i = 0; i = nums.Count; i++)
  6.         {
  7.             if (i % 2 != 0)
  8.                 {
  9.                     nums2[i] = nums[i];
  10.                 }
  11.         }
  12.  
  13.         return nums2;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement