logo
CSharp_Prog_Guide

Добавление директив using

В некоторых случаях можно попытаться создать экземпляр класса .NET Framework без полного имени. Тогда IntelliSense отображает смарт-тег после неразрешенного идентификатора. Если щелкнуть смарт-тег, IntelliSense выведет список директив using или квалификаторов, которые позволят разрешить идентификатор. После выбора из списка IntelliSense либо добавить директиву в начало файла с исходным кодом, либо вставит квалификатор перед неразрешенным идентификатором.

Refactoring

As a code base grows and evolves over the course of a development project, it is sometimes desirable to make changes in order to make it more readable to humans, or more portable. For example, you may want to split some methods up into smaller methods, or change method parameters, or rename identifiers. The Refactoring feature, which you can find by right-clicking in the Code Editor, does all this in a way that is much more convenient, intelligent, and complete than traditional tools such as search and replace.

Code Snippets

Code snippets are small units of typically used C# source code that you can enter accurately and quickly with only several keystrokes. The code snippet menu is accessed by right-clicking in the Code Editor. You can browse from among the many snippets provided with Visual C#, and you can also create your own.

Wavy underlines

Wavy underlines give you instant feedback on errors in your code as you type. A red wavy underline identifies a syntax error such as a missing semicolon or mismatched braces. A green wavy underline identifies a potential compiler warning, and blue identifies compiler errors. The following illustration shows a red wavy underline: