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