aslen

Untitled

Dec 29th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication3
  8. {
  9.  
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             List<int> numb = new List<int> { 1, 5, 7, 19 };
  15.             for (int i = 0; i < numb.Count; i++)
  16.             {
  17.                 numb.Select(x => Calc(numb[i]));
  18.             }
  19.             foreach (var item in numb)
  20.             {
  21.                 Console.WriteLine(item);
  22.             }
  23.  
  24.         }
  25.         private static int Calc(int x)
  26.         {
  27.            
  28.             return x + 5;
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment