How to use Visual Studio to write code

Visual Studio for mac (Microsoft code editor), referred to as VS, is a basic complete set of development tools, which includes most of the tools throughout the software life cycle needs, such as UML tools, code management and control tools, integrated development environment ( IDE), and so on. How to write code using Visual Studio? [dl] 15-1344 [/ dl]
Source Editor
reliable source editor coding essential for easy and efficient. Visual Studio for Mac provides a sophisticated source editor, which is a central place to interact with the IDE. Source Editor provides the necessary functionality to easily work: from syntax highlighting, code folding and code snippets and other basic functions, to the advantage of its integrated Roslyn compiler (such as full-featured IntelliSense code completion) brought full-featured.
Visual Studio for Mac in the source editor and the IDE supports all other functions (such as debugging, refactoring, and version control integration) seamless experience.
This article describes some of the major source editor functions, and to explore how to use Visual Studio for Mac to increase productivity as much as possible.
Source editor experience
to quickly see the code and in which the efficient movement is an important part of the development workflow. View and maintenance of the code is determined by their own way, this may be due to developer-specific, and often vary by project.
Visual Studio for Mac provides many powerful features to maximize ease of use and practicality of cross-platform development. The following section describes some important functions.
Code folding
Code folding allows developers to show or hide a complete code portion (e.g., using instructions, code and comments and boilerplate #region statement), simplifying the management of large source code files. In Visual Studio for Mac, the default OFF state code folding
To open code folding, navigate to the "Visual Studio"> "Preferences"> "Text Editor"> "General"> "Code Folding": This menu also provides the default folding #regions and comments, display name prompt, replacing the code Options.
To show or hide part of the code, using the widget Publication numbers next to the line:

也可通过使用“视图”>“折叠”>“切换折叠”/“切换所有折叠”菜单项,在显示和隐藏折叠间切换:此菜单项也可用于启用或禁用代码折叠。
空格
可能需要在源代码中查看不可见的字符。 这是确保遵守编码标准、避免不必要的空间浪费的直观方法。 在编写依靠精确缩进行来评估代码的 F# 时,它也有所帮助。
要显示空格,请导航到“Visual Studio”>“首选项”>“文本编辑器”>“标记和规则”,并设置选项。 选择此选项后,可设置何时显示不可见字符 :“从不”、“选择时”或“始终”:还可使用显示制表符、空格和行尾的选项:不可见字符显示为灰点,如下图中所示:标尺
列标尺对于确定行长度很有帮助,对于具有行长度准则的工作团队尤其如此。 要打开或关闭列标尺,请导航到“Visual Studio”>“首选项”>“文本编辑器”>“标记和标尺”,并选中(或取消选中)“显示列标尺”,如下图中所示:
首选项对话框,其中突出显示了“显示列标尺”在源编辑器中,它显示为垂直的浅灰色直线。
突出显示标识符引用
启用“突出显示标识符引用”选项后,可以选择源代码中的任何符号,且源编辑器会向该文件中的所有其他引用提供一个直观的指南。 要启用此选项,请导航到“Visual Studio”>“首选项”>“文本编辑器”>“标记和标尺”,并选中“突出显示标识符引用”,如下图所示:
首选项对话框,其中突出显示了“突出显示标识符引用”突出显示的颜色还有助于指示正在分配或引用的某些内容。 分配的内容以红色突出显示;引用的内容以蓝色突出显示:

Guess you like

Origin www.cnblogs.com/zhzhiy/p/11299038.html