I am looking at this example from the google cloud platform.
https://cloud.google.com/storage/docs/json_api/v1/json-api-dotnet-samples
Specifically:
public void DownloadStream(string bucketName)
{
StorageService storage = CreateStorageClient();
using (var stream = new MemoryStream())
{
storage.Objects.Get(bucketName, "my-file.txt").Download(stream);
var content = Encoding.UTF8.GetString(stream.GetBuffer());
Console.WriteLine($"Downloaded my-file.txt with content: {content}");
}
}
Console.WriteLine($ keeps giving me an error. I am using Visual Studio 2013 and cant seem to get this to work properly. Instead what i have to do is remove the dollar sign and + content as a variable.
I read this is a new syntax for C# version 6? Am i missing something? - Cant do this on Visual studio 2013?
Thanks for your responses!
I have updated my solution to provide a picture of the error. All it says is ) Expected.
It seems it does not recognize the dollar sign.