Run Code
|
API
|
Code Wall
|
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
1
asxsdf
Random Number Generation
KeyValue pair C#
HelloWorld
Random number guessing game v1
Fórum ➡ Aggregating 2 compatible dictionaries, using LINQ ♦
CubexSoft2
test type casting
lilnq 1
C# get decimal part only form double extension