Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static List<int> GetEvenNumbers(this List<int> nums)
- {
- List<int> nums2 = new List<int>();
- for (int i = 0; i = nums.Count; i++)
- {
- if (i % 2 != 0)
- {
- nums2[i] = nums[i];
- }
- }
- return nums2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement