Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# string to char

//Creates char-array out of the string

string str = "Hello";
char[] characters = str.ToCharArray();

//if string is only one letter:

string str = "A";
char character = char.Parse(str);

//or

string str = "A";
char character = str.ToCharArray()[0];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #char
ADD COMMENT
Topic
Name
3+3 =