The intellisense of LINQ extension methods cause bad coding experience
Here is the sample query: https://share.linqpad.net/oteqo683.linq
The first line:
var files = System.IO.Directory.GetFiles(@"G:\", "*", System.IO.SearchOption.TopDirectoryOnly).ToList();
The second line:
It because the variable files
is a List<string>
type. It do have a Count
property. I don't have to use LINQ extension method Count()
. So when I type file.cou
then I hit Tab
. See screenshot below:
Then I'll will actually get files.Count(f => )
as a intellisense result which is unexpected:
Then I have to hit DELETE 6 times and BACKSPACE 1 time to get my result. That's a bad coding experience.
Do you have any way to improve that experience?
Comments
I'll look in this. In the meantime, you can work around this either by pressing Enter instead of Tab, or after you press Tab, press Ctrl+Z instead of delete and backspace.
Your workarounds are good.
Enter
Tab
then pressingCtrl+Z
.