Your problem is a common mistake. Here is what you need to do:
rowString = rowString.Replace('"', ' ').Trim();
Be sure to return the result to a variable ( rowString = ). If you don't, C # will still invoke methods, but it will not change this variable. This applies to any immutable objects .
Example:
rowString.Replace('"', ' ').Trim();
will not modify the actual rowString .
rowString = rowString.Replace('"', ' ').Trim();
replaces the old rowString value rowString result of the code on the right.
I wrote this answer and only realized that Habib explained the same thing above. :)
Chris h
source share