Skip to content

Commit 721f739

Browse files
committed
Use collection expression to create Summaries variable in WeatherForecastController
1 parent fe0fbff commit 721f739

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/WebApi-CSharp/Controllers/WeatherForecastController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ namespace Company.WebApplication1.Controllers;
2828
#endif
2929
public class WeatherForecastController : ControllerBase
3030
{
31-
private static readonly string[] Summaries = new[]
32-
{
31+
private static readonly string[] Summaries =
32+
[
3333
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
34-
};
34+
];
3535

3636
private readonly ILogger<WeatherForecastController> _logger;
3737

0 commit comments

Comments
 (0)