I want to convert a string variable into char that char variable will have a length 30 symbols always. I code in C#.
string str="aaa";
char[30] myChar = theString.ToCharArray();
And this code creates “myChar” with just 3 symbols. I want that “myChar” will be 30 symbols. How to do it?
1 Answer