Run Code
|
API
|
Code Wall
|
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
Дамир
reversearr
Added Carnival, List Matching
Overloading == operator (for comparing values inside objects)
linked list reversal recursive
Delegates
Консоль. Депозит
Test
List
Comp4.1