String variable stores value as like  .. careteam order 4-26-11.csv
i need to trim the value .. in c# as like  careteamorder4-26-11.csv  - by removing the space ..!
how to remove empty space in the string variable ?
String variable stores value as like  .. careteam order 4-26-11.csv
i need to trim the value .. in c# as like  careteamorder4-26-11.csv  - by removing the space ..!
how to remove empty space in the string variable ?
 
    
    string trimmed = "careteam order4-26-11.csv".Replace(" ", string.Empty);
 
    
        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;
        }
    }
 
    
    