// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; class MainClass { public static void Main(string[] args) { string s = "12345"; int[] v = new int[s.Length]; int tmp = Int32.Parse(s); for(int i = 0; i < v.Length; i++) { v[v.Length - 1 - i] = tmp % 10; tmp /= 10; } for(int i = 0; i < v.Length; i++) Console.WriteLine(v[i]); } }