Hi,
I am creating a service in asp.net core api..while building my code i am getting this error
CS1056 -Unexpected character ""
when i declare string name = "projects/max78A"; i am getting this error
my code:
- using (var httpClient = new HttpClient())
- {
- string name = "projects/max78A";
- var content = "{\"name\": \"" + name + "\"}";
- var stringContent = new StringContent(content, Encoding.UTF8, "text/plain");
- Console.WriteLine("Sending Request: " + requestUri + stringContent);
- HttpResponseMessage response = await httpClient.PostAsync(requestUri, stringContent).ConfigureAwait(false);
- return await response.Content.ReadAsStringAsync();
- }
i havent face this problem before please help me to understand what is the issue

Sachin SinghRank #66 · 26.2K reputationPosted May 12, 2021, 4:22 AM EDT
Sachin SinghRank #66 · 26.2K reputationPosted May 11, 2021, 10:29 AM EDT
Sujeet RamanRank #1,329 · 1.3K reputationPosted May 12, 2021, 3:57 AM EDT
Sujeet RamanRank #1,329 · 1.3K reputationPosted May 12, 2021, 4:17 AM EDT