C# Tutorial - Working with the Code Editor![]() The Code Editor window lets you create and edit source code when working on any type of application. If you are working on a windows application then you can flip back to the Forms Designer by right-clicking on the code window and selecting View Designer, using the keyboard shortcut Shift+F7 or by selecting Designer from the View menu. The Code Editor is used to write the statements that do the work in the application. It looks like any other text editor, but has several special features that simplify the task of editing source code. For example, syntax highlighting changes all of the keywords in the language that you are using to a different colour to distinguish them from your own code. Also, all comments are coloured green to make them stand out from the rest of the source code. The Code Editor has built in Intellisense/code-completion, so that you do not have to remember every method that is associated with an object. The Intellisense shows what methods are available to the object and what they each do if comments are supplied. In addition to Intellisense, the editor allows you to select and member of a class from the drop down boxes at the top of the code editor windows. The left hand box allows you to select the class that you want, while the right hand box allows you to select the member you wish to go to. In the case of partial classes, any member that is located in the other file of the class is shown in grey (as shown below). ![]() Another nice feature is code folding. The editor allows you to minimise a method or class into a single line (more on this later). The Code Editor is where all of the hard work is done when developing applications and when used in conjunction with the Forms Designer window, this allows you to rapidly develop applications for both the windows and web environments.
|