Home
Options

The intellisense of LINQ extension methods cause bad coding experience

edited February 23

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

Sign In or Register to comment.