Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Converting an int to an int[] using linq.
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int num = 456123; var numArray = num.ToString().Select(x => int.Parse(x.ToString())).ToArray(); foreach(int item in numArray) { Console.WriteLine(item); } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Expression Tree - Demo1
Generic hierarchy
a6
EX8 Loop_For_While
Multithreading
Code challenge: Integer Comparison - Overkill - Function Dictionary
Math 9.61
Polygon Util
,
Full text search using Linqdb
Please log in to post a comment.