Closed vsfeedback closed 3 days ago
Most likely it was me who introduced this change in https://github.com/dotnet/roslyn/pull/50212.
@mikadumont can you add this to your list of issues for better suggested names?
Closing out due to lack of broader feedback.
This issue has been moved from a ticket on Developer Community.
I'm using C# in vanilla VS2019 Community 16.8.2, porting a project from .NET Framework 4.5.2 that I developed in vanilla VS2017 Community to .NET 5.0 (just in case Intellisense behaves differently depending on the target platform) and have run into an annoying issue with Intellisense. I've got a situation where I have an interface that inherits from
IEnumerable<T>
:There are many concrete types that can be queried for one or more things, most of which are not primarily used for the purpose of querying --- this is just a useful abstraction for a separate problem.
VS2019 has this annoying feature of insisting that
Foo : IQueryable<TQuery, Bar>
should be namedbars
, presumably because it implementsIEnumerable<Bar>
, to the point of not offering me the option to name itfoo
(for class members, it suggestsbars, Bars, GetBars()
). This is even worse when I have types that are queryable for multipleTData
, where the suggested name is not just annoying but can be completely incorrect for the context I'm using it in, offering me only the option to name it after theTData
in the first interface (e.g.Foo : IQueryable<TQuery, Bar>, IQueryable<TQuery, Qux>
only gets the suggested namebars
).VS2017 did not do this, only offering me to name it
foo
, a much more suitable default name --- but it would save a lot of time if Intellisense would suggest all of the above options.Original Comments
Feedback Bot on 2/4/2021, 10:27 PM:
Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.