O'Reilly logo

Visual C# 2005: A Developer's Notebook by Jesse Liberty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Make the Editor Work for You

The editor can be your most important tool for creating programs, yet few developers take the time to fully master it; and thus they miss out on potential gains in their productivity.

Note

The Visual Studio editor can be your most important tool for creating programs.

In this lab, you'll see how Visual Studio 2005 and several new features can work for you.

How do I do that?

The best way to explore the editor is to open a new Windows project. Let's call it EditorExploration. Visual Studio starts you out with a nice clean form named Form1, and also creates three additional files: Form1.cs to hold the code related to the form, Form1.designer.cs to hold the code created by the form designer, and Program.cs to hold the code related to the application.

Drag a label and a button anywhere onto the form, and then double-click the button to create an event handler. You should find that Visual Studio 2005 has opened a code-behind file named Form1.cs and has placed you inside the designer-generated button1_Click method.

Change your code

Make some minor changes to the code in your editor. Notice the yellow strip down the side of the window. This indicates changes to your code that have not yet been saved. When the changes are saved, this strip turns green.

Note

A yellow strip indicates unsaved changes. A green strip indicates changes that have been saved.

Use IntelliSense to complete your statement

Inside the button1_click method, type the letter l (lowercase L). IntelliSense ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required