Version Used: Microsoft Visual Studio 15.0.26730.10
Steps to Reproduce:
// Scenario 1:
private IFoo [|]
// Scenario 2:
private static IFoo [|]
Expected Behavior:
Scenario 1 _foo, m_foo, and m_Foo are offered in the completion list.
Scenario 2 s_foo and s_Foo are offered in the completion list.
Actual Behavior:
None of the suggestions above are offered in the completion list, although foo/Foo/GetFoo are.
Perhaps this isn't a bug and whoever implemented this feature just didn't think to add these suggestions, but prefixing fields with _ or m_ is common in a lot of projects so it would be quite valuable if this were fixed.
These completions should probably be tailored to the current code style, i.e. only one of the suggestions in each scenario should be included.
@rawlinson If that is possible it would be great, when I wrote the post I assumed Roslyn didn't have any built-in mechanism for determining that.
It seems this is already implemented, at least in VS 15.4.0. Preview 1.0.
For the two scenarios above, I get _foo and s_foo respectively as the top suggestions, which match my code style.
Yep, this was already fixed by Ravi. @rchande - When did/does this ship?
@jamesqo We included support for using naming styles when we first shipped the declaration completion feature. Let me know if you're still seeing issues.
Most helpful comment
These completions should probably be tailored to the current code style, i.e. only one of the suggestions in each scenario should be included.