You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a setting to enable type hints for collection expressions. If enabled, it would show types like the existing "Show hints for implicit object creation" setting in IDEs but for collection expressions:
note: edited screenshots are from Visual Studio 2022
Background and Motivation
Collection expressions were added in C# 12 along with IDE0028's automatic fix that encourages the use of collection expressions over previous construction syntax. However, collection expressions don't currently support type hints, so developers who prefer to see type hints have to keep using previous construction syntax and suppress or ignore IDE0028.
The text was updated successfully, but these errors were encountered:
@MisinformedDNA Yes, this suggestion is still valid. THis is about showing an inline-hint that tells you what the type of the collection expr is that is being created.
Proposal
There should be a setting to enable type hints for collection expressions. If enabled, it would show types like the existing "
Show hints for implicit object creation
" setting in IDEs but for collection expressions:Ideally, there should be a dedicated setting for collection expressions type hints:
note: edited screenshots are from Visual Studio 2022
Background and Motivation
Collection expressions were added in C# 12 along with
IDE0028
's automatic fix that encourages the use of collection expressions over previous construction syntax. However, collection expressions don't currently support type hints, so developers who prefer to see type hints have to keep using previous construction syntax and suppress or ignoreIDE0028
.The text was updated successfully, but these errors were encountered: