Skip to content

Commit 8920729

Browse files
committed
Fix build error and use collection initializer
1 parent 1c6b886 commit 8920729

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/ArbitraryProject/Controllers/WeatherForecastController.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ namespace ArbitraryProject.Controllers
66
[Route("[controller]")]
77
public class WeatherForecastController : ControllerBase
88
{
9-
private static readonly string[] Summaries = new[]
10-
{
9+
private static readonly string[] Summaries =
10+
[
1111
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12-
};
12+
];
1313

1414
private readonly ILogger<WeatherForecastController> _logger;
1515

@@ -21,7 +21,7 @@ public WeatherForecastController(ILogger<WeatherForecastController> logger)
2121
[HttpGet(Name = "GetWeatherForecast")]
2222
public IEnumerable<WeatherForecast> Get()
2323
{
24-
logger.logInformation("Generating weather forecast data.");
24+
_logger.LogInformation("Generating weather forecast data.");
2525

2626
return [.. Enumerable.Range(1, 5).Select(index => new WeatherForecast
2727
{

0 commit comments

Comments
 (0)