I have a string str="Next Action By Download Provider : Price is required; "
I want to remove "Next Action By Download Provider : " but when i am doing its keeping a space.
rowValue = rowValue.Replace("Next Action By Download Provider : ", " ") .
How can i remove a space which is replacing the string.
How to remove character from string
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Vishal YelveRank #178 · 13.6K reputationPosted Nov 19, 2024, 10:35 AM EST
Hi Pinku,
try this
just use Trim() in the end
var stringData = "Next Action By Download Provider : Price is required;"; var result = stringData.Replace("Next Action By Download Provider :"," ").Trim(); Console.WriteLine(result);PinkuRank #3,922 · 378 reputationPosted Nov 19, 2024, 11:15 PM EST
Thanks Vishal.Its working