Let's say we have variable x with value "hello world" (with quotes)
string x = @"""hello world""";
string y = ???
How to convert x to hello world (without quotes) and assign it to y ?
You can use string.Trim passing it a double quote. It would remove double quote from start and end of the string. Like.
string y = x.Trim('"');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With