character replace
-
Hi to all, I have one string "Ganges: River Of Life" & i want to replace ':' character with space. i have following code but it is not working. str = "Ganges: River Of Life"; str.Replace(':',' '); Anybody tell me why this happened?
Pravin
-
Hi to all, I have one string "Ganges: River Of Life" & i want to replace ':' character with space. i have following code but it is not working. str = "Ganges: River Of Life"; str.Replace(':',' '); Anybody tell me why this happened?
Pravin
The reason is that Replace function doesn't modify its parameter, it just returns new string so your code should look like this:
str=str.Replace(':',' ');
#region signature my articles #endregion
-
The reason is that Replace function doesn't modify its parameter, it just returns new string so your code should look like this:
str=str.Replace(':',' ');
#region signature my articles #endregion
thanks Giorgi Dalakishvili, code is working now...! thanks again.
Pravin
-
thanks Giorgi Dalakishvili, code is working now...! thanks again.
Pravin
Glad to help you :)
#region signature my articles #endregion