Home
Options

Autocomplete issues

I seem to be having problems where auto-complete does not always work.

For example, after I type
var ctl = Company.ToList();

var query = (from r in ctl 
It does not offer me ctl in the autocomplete list.

In most cases, this just means I have to type in the full variable name and the autocomplete list does not help, but does not hinder either. But in this particular case, I have a table called ProductLabel and so there is one, and only one entry which appears in the autocomplete list and so when I press space bar it replaces ctl with ProductLabel which means I have to go back and re-type ctl again.

When I have only typed ct it is highlighted red (to indicate a compiler error), but turns blue when add the l so it knows the code compiles at the stage.

It does not seem to be related to the table (Company in this case) or the actual variable name, as it does not work if I use a longer variable name.

LinqPad version is v5.22.09

Comments

  • Options
    Does this occur if you create a query with *just* the text that you've posted?

    Or does it require more context?
  • Options
    If I open a new query without any connection and type
    var ctl = new List<string>();
    
    (from r in ctl 
    then I don't get any autocomplete list prompted. If I press Ctrl-Space before I have the whole variable name type, then my variable is shown.

    If I connect a query to a connection to the NorthWind database, then I do get an auto-complete list, but my variable is not in the list unless I press Ctrl-Space.

    In fact, with the Northwind database, when I have typed ctl, the only entry in the autocomplete list is CurrentProductList and so pressing space-bar will replace ctl with CurrentProductList.

    I tend to favour the query syntax for Linq queries, but I have just noticed that auto-complete list works fine for method syntax, ie if I type
    var ctl = new List<string>();
    
    ctl
    then ctl is in my autocomplete list (both when I have a connection to Northwind and without a connection).
Sign In or Register to comment.