I would like to remove single quote from beginning and end of this string;
string tabName = "'i# milestones$'";
string outputTabName = tabName.Trim(new char[]{(char)39});
Where (char)39
represents '
, and the .Trim()
will remove the first and last '
from the string; You can try like this as well:
string outputTabName = tabName.Trim('\'');
Add to favorites