HI WELCOME TO Sirees

How to trim whitespace between characters

string str = "C Sharp";
str = str.Replace(" ", "");
or if you want to remove all whitespace characters (space, tabs, line breaks...)
string str = "C Sharp";
str = Regex.Replace(str, @"\s", "");