I have a data file in INI file like format that needs to be read by both some C code and some C# code. The C code expects string values to be surrounded in quotes. The C# equivalent code is using some underlying class or something I have no control over, but basically it includes the quotes as part of the output string. I.e. data file contents of

MY_VAL="Hello World!"

gives me

"Hello World!"

in my C# string, when I really need it to contain

Hello World!

How do I conditionally (on having first and last character being a ") remove the quotes and get the string contents that I want.

Edit
Report