.NET Framework and Visual Studio

8
.NET Programming Module 1 & 2 Prepared by: Jun Navarra, Trainer What Is Microsoft.NET? Microsoft .NET is a strategy developed by Microsoft to encourage communication between systems within organizations. The technologies that support .NET promote fast development of solutions that you can deploy and manage efficiently and effectively. The .NET Framework consists of components that modularize and simplify the development of distributed applications. The two main components promoted by the .NET Framework are the common language runtime (CLR) and the .NET Framework class library. .NET Framework Components Benefits of the .NET Framework  Based on Web standards and practices  Functionality of .NET Framework classes is universally available  Code is organized into hierarchical namespaces and classes  Extensible and language independent

Transcript of .NET Framework and Visual Studio

Page 1: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 1/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

1

What Is Microsoft.NET?

Microsoft .NET is a strategy developed by Microsoft to encourage communication between systems withinorganizations. The technologies that support .NET promote fast development of solutions that you candeploy and manage efficiently and effectively.

The .NET Framework consists of components that modularize and simplify the development of distributed

applications. The two main components promoted by the .NET Framework are the common languageruntime (CLR) and the .NET Framework class library.

.NET Framework Components

Benefits of the .NET Framework

•  Based on Web standards and practices•  Functionality of .NET Framework classes is universally available•  Code is organized into hierarchical namespaces and classes•  Extensible and language independent

Page 2: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 2/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

2

The .NET Framework has a predefined process for converting your high-level source code into managedmodules that the CLR executes.

Managed Execution ProcessThe managed execution process consists of the following steps:

1.  Compile your source code into a language that the run-time environment can understand. Forexample, the .NET compiler will translate your Microsoft Visual C#® or Microsoft Visual Basic®source code into Microsoft Intermediate Language (MSIL).

2.  Translate the MSIL code into the machine language of the client on which it will run. To achievethis, the.NET Framework utilizes a process called just-in-time (JIT) compilation when you run thecode.

3.  Execute the machine language by using the infrastructure of the CLR. The CLR loader is responsiblefor loading and initializing code. Your code is loaded on demand so that unused sections of a

program are never brought into memory.

Page 3: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 3/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

3

What is Visual Studio 2008?

Visual Studio: The Tool for .NET Development

Visual Studio 2008 provides an IDE where you can build your .NET Framework applications using a

language of your choice. The intuitive design enables developers to quickly become productive andmaximize the use of the sophisticated underlying functionality. Visual Studio 2008 simplifies the process of 

creating and deploying distributed solutions.

Structure of Visual Studio 2008 Solutions and Projects

Visual Studio 2008 uses solutions and projects as conceptual containers to organize your source files

during development. Categorizing your source files in this way simplifies the build and deployment processfor your .NET Framework applications.

Page 4: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 4/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

4

Windows Forms Applications provide a powerful way to create a Windows-based application. Visual Studio2008 offers several application templates to support the development of various applications and

components. The Windows Forms application template provides the tools, structure, and starter code tohelp you develop desktop applications that have a comprehensive user interface.

Create a Windows Forms application project

1. Open Microsoft Visual Studio 2008.2. On the File menu, point to New, and then click Project.

3. Define the new project:i. Select a project type, for example, Microsoft Visual C#® or Visual Basic®.ii. Click the required Windows application template.iii. Type a name for the Windows Forms application.

iv. Define the location for the project files.

4. Click OK to create the Windows Forms application project.

 Save a Windows Forms application project

• In Visual Studio 2008, open the File menu. You can then either:• Click Save All to save the entire project.

OR

• Click Save <Object Name> to save the current item selected.

Add a new item to a Windows Forms application projectTo add a new item to a Windows Forms application project, you can follow these steps.

1. In Microsoft Visual Studio 2008, in Solution Explorer, right-click the project, point to Add, and thenclick New Item.

2. In the Add New Item dialog box, click the item that you want to add, for example, a new Windows

Form.3. In the Add New Item dialog box, click Add.

Add an existing item to a Windows Forms application project

To add an existing item to a Windows Forms application project, you can follow these steps.1. In Microsoft Visual Studio 2008, in Solution Explorer, right-click the project, point to Add, and then

click Existing Item.2. In the Add Existing Item dialog box, browse to the item that you want to add.

3. In the Add Existing Item dialog box, click Add.

Page 5: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 5/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

5

Page 6: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 6/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

6

How to Output Information in a Message Box:

MessageBox.Show("Hello world", "My MessageBox", _ 

MessageBoxButtons.OKCancel , MessageBoxIcon.Asterisk)

Page 7: .NET Framework and Visual Studio

8/3/2019 .NET Framework and Visual Studio

http://slidepdf.com/reader/full/net-framework-and-visual-studio 7/7

.NET Programming – Module 1 & 2 Prepared by: Jun Navarra, Trainer

7