remove space between two words in c# code example Example: how to remove space between string in c# string str = "C Sharp"; str = Regex.Replace(str, @"\s", "");