I have a code which sends a POST request to a web application and parses the response.
I'm sending the request with following code:
byte[] responseBytes = webClient.UploadValues("https://example.com", "POST", formData);
Converting byte
data to string
with this:
string responsefromserver = Encoding.UTF8.GetString(responseBytes);
responsefromserver
equals something like this: "abcd"
I want to strip "
characters. Therefore, I'm using following method:
Console.WriteLine(responsefromserver.Replace('"', ''));
But ''
shows me this error: Empty character literal
When I try to use string.Empty
instead of ''
, I get this error: Argument 2: cannot convert from 'string' to 'char'
What should I do to strip "
characters from my string?