in c# how to convert an varto a char array. char[8] array I can guarantee this var is not too big.
such as, I have
var a = 634711440648369988;
and I want char[8] c
store it.
How to do this conversion correctly? Thanks.
You can just cast it to a string and use the ToCharArray
method.
char [ ] c = a.ToString().ToCharArray();