Convert a Character to the String in C#
Given a character, the task is to character to the string in C#.
Input : X = 'a' Output : string S = "a" Input : X = 'A' Output : string S = "A"
Approach: The idea is to use ToString() method, the argument is the character and it returns string converting Unicode character to the string.
// convert the character x // to string s public string ToString(IFormatProvider provider);
Type of A : System.Char Type of A : System.String