ProvideLanguageServiceAttribute.CodeSenseDelay ProvideLanguageServiceAttribute.CodeSenseDelay ProvideLanguageServiceAttribute.CodeSenseDelay Property


Determines the amount of time before a parse operation is started to support an IntelliSense operation.

public int CodeSenseDelay { get; set; }
member this.CodeSenseDelay : int with get, set
Public Property CodeSenseDelay As Integer
Property Value

Returns the number of milliseconds delay before a parse is started.


[ProvideLanguageService(typeof(MyLanguageService),           // Required  
                        MyConstants.languageName,            // Required  
                        MyConstants.languageNameResourceID,  // Required  
    // Optional language service properties  
    CodeDelay = 1500,  // Milliseconds to wait before parsing  


To avoid excessive parsing while the user works, Many IntelliSense operations trigger a parse only if the system is idle for a period of time. This period of time is determined by the CodeSenseDelay property. For example, if the IntelliSense Quick Info is supported (the CodeSense and QuickInfo properties are set to true) and the CodeSenseDelay is set to 1500, when the user holds the cursor over an identifier, the language service waits 1500 milliseconds before starting a parse operation that returns information about that identifier. The information is then shown in a ToolTip window that appears next to the identifier.

If the CodeSenseDelay is too short, excessive parsing may slow the response time of the user interface. If the CodeSenseDelay is too long, the user may not wait long enough for the feature to be activated and may think the feature is not supported.

This property is specific to the managed package framework (MPF).

The default value is 1000 milliseconds when the corresponding registry entry is accessed through the LanguagePreferences class.

The registry entry looks like this:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\[X.Y]\Languages\Language Services\  
  [Language Name]\  
    CodeSenseDelay = reg_dword: 0x000005dc  

Applies to