The String variable stores the value as. careteam order 4-26-11.csv
careteam order 4-26-11.csv
I need to trim the value .. in C # like t careteamorder4-26-11.csv - removing the space ..!
careteamorder4-26-11.csv
how to remove empty space in string variable?
public string RemoveSpaceAfter(string inputString) { try { string[] Split = inputString.Split(new Char[] { ' ' }); //SHOW RESULT for (int i = 0; i < Split.Length; i++) { fateh += Convert.ToString(Split[i]); } return fateh; } catch (Exception gg) { return fateh; } }
string trimmed = "careteam order4-26-11.csv".Replace(" ", string.Empty);