自动完成案例问题

Jef*_*f E 5 c# intellisense autocomplete visual-studio

When writing C# in Visual Studio (Community 2017), it's always really bugged me that when I have two similarly-named identifiers, one beginning with upper-case and one beginning with lower-case, that sometimes when I start typing in lower-case it'll autocomplete on the upper-case identifier instead.

This typically happens when I'm assigning from a lower-case parameter to an upper-case field/property, for example:

在此输入图像描述

When I start typing my..., it matches the lower-case myValue until I type the v, at which point it starts to match the upper-case MyValue instead. Obviously I don't want this because then I'll end up with MyValue = MyValue! Is there any way that I can get it to resolve case ambiguities based on the case of the first letter only instead of whatever it's doing now? If I start typing in lower-case then I want it to continue matching the identifier beginning with lower-case as I type more characters.

Edit: Here's an example where it's matching a type instead of a variable. I've typed the parameter name in full, with proper case, and it's still matching a type rather than the variable:

在此输入图像描述

bbo*_*234 6

我同意。这是我就这个问题写的。

请使智能感知区分大小写。当我输入 myV 时,它应该选择 myValue 而不是 MyValue。当我输入 Myv 时,它应该选择 MyValue 而不是 myValue。

关键在于:当用户费心使用 Shift 键将字母大写时,他们想要该字母大写的变量或成员。如果你们能做到这一点,我会高兴死的。请。


Sar*_*SFT 1

对于你的第一个例子,我在本地测试了它,结果如下截图,我发现预选的完成列表取决于 \xe2\x80\x9c最近使用的成员\xe2\x80\x9d,请检查这个:Visual C# IntelliSense \n在此输入图像描述

\n\n

IntelliSense 会记住您最近在弹出的“成员列表”框中选择的成员,以便自动完成对象名称。下次使用会员列表时,最近使用的会员会显示在顶部。

\n\n

对于你的第二个例子,我得到了与你相同的结果。由于我们尝试将代码键入 \xe2\x80\x98()\xe2\x80\x99 ,并且我假设 VS 根据某些特定规则或原则过滤完成列表,我们也可以从上述文档中找到规则。

\n\n

如果您对这个intellisense有什么建议或者想法,请到帮助-发送反馈-提供建议\xe2\x80\xa6分享给VS产品团队,他们愿意听到不同的建议和用户的声音。

\n