dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.47k stars 10.03k forks source link

Use collection expression for ASP.NET Core Web API project template's WeatherForecastController.cs #58175

Closed tikap closed 1 month ago

tikap commented 1 month ago

Suggested Change:

I would like to submit a PR that changes the way an array of strings are initialized in the WeatherForecastController.cs file for the ASP.NET Core Web API project template.

We should use the new collection expressions introduced in .NET 8.0 to create the "Summaries" string array to prevent styling warnings, i.e ide0300.

Target file: WeatherForecastController.cs

Impact: Visual studio uses this template when user selects "ASP.NET Core Web API" in the "Create a new project" wizard.

captainsafia commented 1 month ago

@tikap This sounds like a great idea! I'd be happy to review a PR from you for this. 😃

dotnet-policy-service[bot] commented 1 month ago

Looks like this issue has been identified as a candidate for community contribution. If you're considering sending a PR for this issue, look for the Summary Comment link in the issue description. That comment has been left by an engineer on our team to help you get started with handling this issue. You can learn more about our Help Wanted process here

tikap commented 1 month ago

Thanks @captainsafia !