IntelliSense suggests the "String" class, not the "string" keyword
See original GitHub issueThis issue has been moved from a ticket on Developer Community.
[severity:It’s more difficult to complete my work] In C# when I write the lower case “string” keyword, IntelliSense suggests always the upper case written “String” class. When I’m choosing it gets automatically faded out with the tip to use the lower case “string” keyword. I would expect that IntelliSense is smart enough to suggest the users preferences. …Or at least suggest what the user has written (lower or uppercase version)
I believe this is because the MRU (most recently used) cache the completion uses. By default, we’d select the keyword if you typed string
(which is a perfect match.) However, once you selected and committed the type item String
, it’d be saved in MRU and next time you type string
the completion would “remember” that decision and select type String
even though string
is a strictly better match. Manually selecting string
and committing it would cause subsequent selection to pick string
.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Roslyn suggests the right thing here, indicating a misconfiguration with those projects (for example, perhaps they set the bit indicating that ‘String’ is teh preferred user style). You would have to take it up with them. We give teh user the choice on this for VS and we should be respecting that. If not, that would then be a bug here.
Sorry, I see it’s the problem of ReSharper.
Have a nice day!