I have the following line of code in which I'm trying to use string interpolation, but I'm having an issue with my variable {time}
:
logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
After string interpolation (see below), I get this error: Time does not exist in the current context.
logger.LogInformation($"Worker running at: {time}", DateTimeOffset.Now);