Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.               List<int> hierSollenIntsRein = new List<int>() { };
  13.               List<string> stringInts =  new List<string>() {"1", "2", "3" };
  14.  
  15.              
  16.             //EPICNESS:
  17.             hierSollenIntsRein = stringInts.ConvertAll<int>(Convert.ToInt32);
  18.  
  19.  
  20.               //Test
  21.               foreach (int i in hierSollenIntsRein)
  22.               {
  23.                   Console.WriteLine(i.ToString());
  24.               }
  25.  
  26.               Console.Read();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement