, ,
str.Trim('"')
The double quote is enclosed in two single quotes, and that is it. This method is not limited to double quotes, but you can do for any character.
In addition, if you want to do the same only for the beginning or end of a character (not for both), even then there is an option. You can do the same as
str.TrimEnd('"')
this only removes the last character and
str.TrimStart('"')
deletes only the first (start) character
source
share