Udostępnij za pośrednictwem


Pre-selected Completion List Items in C#

In the Visual C# development environment, IntelliSense can automatically select completion list items as you type in the Text Editor. This feature is available in certain contexts for the keywords new and enum.

new Keyword

When you type new and then press the SPACEBAR, a completion list appears. An item is automatically selected in the list, based on the context in your code. For example, items are automatically selected in the completion list for declarations and for return statements in methods.

enum Keyword

When you press the SPACEBAR after an equal sign for an enum assignment, a completion list appears. An item is automatically selected in the completion list, based on the context in your code. For example, items are selected in the completion list after you type the keyword return and when you make a declaration.

See Also

Reference

enum (C# Reference)

new (C# Reference)

Other Resources

Automatic Code Generation