IntelliSense for strings doesn't work as expected

In this case the Last() extension method isn't recommended by the intellisense menu, but it should be.
"12345".Last()

In this case Last() is recommended:
"12345".AsQueryable().Last()

I assume because of that behavior a lot of people expect they must add AsQueryable() to use Last().

Comments

  • LINQPad hides the LINQ extension methods on the string type, because most of the time they get in your way, in that you don't want to treat string as an IEnumerable.

    If you type in a LINQ extension method on string, however, the parameter autocompletion will still work.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!