Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellisense should suggest static members of target type #28603

Closed
jnm2 opened this issue Jul 17, 2018 · 4 comments · Fixed by #52163
Closed

Intellisense should suggest static members of target type #28603

jnm2 opened this issue Jul 17, 2018 · 4 comments · Fixed by #52163
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Milestone

Comments

@jnm2
Copy link
Contributor

jnm2 commented Jul 17, 2018

(Visual Studio 15.7.5)

Intellisense should suggest static members of the target type which return an instance of the target type.

After typing Foo(e, wanting to pass an empty immutable array:

image

After typing Foo(e (ReSharper):

image

Visual Studio, after typing Foo(e):

image

With ReSharper, after typing Foo(e):

image

This is also quite useful for hand-rolled discriminated unions. (foo = Foo.Bar, foo = Foo.Baz(3), etc.)

@sharwell sharwell added Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved. labels Jul 17, 2018
@sharwell
Copy link
Member

sharwell commented Jul 17, 2018

The easiest initial implementation would be a generalization of the current support for enum values: include target-typed static fields and properties of the target type in completion.

@jinujoseph jinujoseph added this to the 16.0 milestone Jul 17, 2018
@jinujoseph jinujoseph modified the milestones: 16.0, 16.1, Backlog Jan 16, 2019
@RikkiGibson
Copy link
Contributor

It feels like there's no need for this to end at fields/properties, you could also be typing 'cr' and benefit from getting ImmutableArray.Create<T>()

@Joe4evr
Copy link

Joe4evr commented Dec 17, 2019

The easiest initial implementation would be a generalization of the current support for enum values: include target-typed static fields and properties of the target type in completion.

Does this also include assignments?

@jnm2
Copy link
Contributor Author

jnm2 commented Dec 22, 2019

@Joe4evr I would expect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Feature Request Need Design Review The end user experience design needs to be reviewed and approved.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants