Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,026 questions

51,982 answers

573 users

How to convert a number to char array in C#

1 Answer

0 votes
using System;

public class Program
{
	public void Main()
    {
        int num = 15234;
		char[] array = num.ToString().ToCharArray();
         
        foreach (char ch in array) {
            Console.Write(ch + ",");
		}
    }
}



/*
run:

1,5,2,3,4,

*/

 



answered Dec 30, 2023 by avibootz

Related questions

1 answer 109 views
1 answer 139 views
139 views asked Jan 21, 2021 by avibootz
2 answers 166 views
166 views asked Jan 10, 2017 by avibootz
2 answers 278 views
278 views asked Jan 9, 2017 by avibootz
1 answer 119 views
119 views asked Apr 2, 2021 by avibootz
1 answer 141 views
141 views asked Feb 3, 2021 by avibootz
1 answer 159 views
159 views asked Nov 28, 2019 by avibootz
...