Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
convert a string of numbers to a list then use a forEach to loop through the list
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string numbers = "1,4,3,6,8,5,3,1,2,3,4"; List<int> numbersList = new List<int>( Array.ConvertAll(numbers.Split(','), int.Parse) ); numbersList.ForEach((item) => Console.WriteLine(item)); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Practice run
c->a
Math 10.8 added quad seq
Integers Array manipulation examples
Student Cables
Sugar
SMS recipient filter testing
Expression Tree - Demo1
BankAccount
Knapsack Problem
Please log in to post a comment.