Chapter 01
Chapter 01
Murachs C# 2010, C1
Slide 1
Objectives
Applied 1. Use Visual Studio 2010 to do any of these operations: Open and close an existing C# project or solution Display the Form Designer for each of the forms in a project Use the Solution Explorer to review the files in a project Open, hide, and adjust the windows for a project Build and run a project
Murachs C# 2010, C1
Slide 2
Objectives (continued)
Knowledge 1. Describe the main difference between a Windows Forms application and a Web Forms application. 2. Name the two languages that you can use for rapid application development with Visual Studio 2010. 3. Describe the two main components of the .NET Framework. 4. In general terms, describe the C# compiler, Microsoft Intermediate Language, the assembly, and the Common Language Runtime. 5. Describe the use of each of these windows in the Visual Studio IDE: Form Designer, Code Editor, and Solution Explorer. 6. In general terms, explain what makes it possible to select a target framework with Visual Studio 2010.
Murachs C# 2010, C1
Slide 3
Murachs C# 2010, C1
Slide 4
Murachs C# 2010, C1
Slide 5
Murachs C# 2010, C1
Slide 7
Murachs C# 2010, C1
Slide 8
Murachs C# 2010, C1
Slide 9
C# compiler
Solution Project
Assembly
Intermediate Language (IL) Source files Class references
Murachs C# 2010, C1
Slide 10
Murachs C# 2010, C1
Slide 11
Murachs C# 2010, C1
Slide 12
Murachs C# 2010, C1
Slide 13
Murachs C# 2010, C1
Slide 14
Murachs C# 2010, C1
Slide 15
Murachs C# 2010, C1
Slide 16
Project files
The Solution Explorer uses different icons to distinguish between source code files that define forms and those that dont. Each form is defined by two C# source files where each file contains a partial class. The file with the cs extension contains the code thats entered by the programmer; the file with the Designer.cs extension contains the code thats generated when the programmer works with the Form Designer. When the project is compiled, these partial classes are combined into a single class that determines the appearance and operation of the form. A source code file that doesnt define a form is usually stored in a single C# source file that contains a single class. The References folder contains references to the assemblies for the namespaces that the application can use. These namespaces contain the classes that the project requires. In most cases, all the references that you need are included when the project is created.
Murachs C# 2010, C1 2010, Mike Murach & Associates, Inc. Slide 17
Murachs C# 2010, C1
Slide 18
Murachs C# 2010, C1
Slide 19
The form thats displayed when the Financial Calculations project is run
Murachs C# 2010, C1
Slide 20
Murachs C# 2010, C1
Slide 21
Murachs C# 2010, C1
Slide 22
Murachs C# 2010, C1
Slide 23