Bagikan melalui


Completion Lists in C#

The IntelliSense completion lists in Visual C# contain tokens from List Members, Complete Word, and more. It provides quick access features:

  • Members of a type or namespace (see List Members),

  • Variables, commands, and functions names (see Complete Word),

  • Code snippets,

  • Language Keywords,

  • Extension Methods

The Completion List in C# is also smart enough to filter out irrelevant tokens and pre-select a token based on context. For more information, see Filtered Completion Lists in C# and Pre-selected Completion List Items in C#.

Code Snippets in Completion Lists

In Visual C#, the completion list includes code snippets to help you easily insert predefined bodies of code into your program. Code snippets appear in the completion list as the snippet's Shortcut Element (IntelliSense Code Snippets). For more information about code snippets that are available in Visual C# by default, see Default Code Snippets.

Language Keywords in Completion Lists

In Visual C#, the completion list also includes language keywords. For more information about C# language keywords, see C# Keywords.

Extension Methods in Completion Lists

In Visual C#, the completion list includes Extension Methods that are in scope.

Note

The completion list does not display all extension methods for String objects. For more information, see Filtered Completion Lists in C#.

Extension methods use a different icon than instance methods. For a listing of list icons, see Class View and Object Browser Icons. When an instance method and extension method with the same name are both in scope, the completion list displays the extension method icon.

See Also

Concepts

Code Snippets (C#)

Filtered Completion Lists in C#

Pre-selected Completion List Items in C#

Reference

List Members

Complete Word