1 / 42

Introduction to the Visual Studio 2010

Introduction to the Visual Studio 2010. Chapter 1:. What C# is &How a C# Program runs . What’s the .NET Framework & What it contains. What you Learn in this chapter?. Visual Studio 2010 & C#. DEMO C# Console. Microsoft’s Modern software development platform. .Net Framework

manton
Download Presentation

Introduction to the Visual Studio 2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the Visual Studio 2010 Chapter 1:

  2. What C# is &How a C# Program runs What’s the .NET Framework & What it contains What you Learn in this chapter? Visual Studio 2010 & C# DEMO C# Console

  3. Microsoft’s Modern software development platform .Net Framework [4.0] Support several programming languages: C# ,VB, C++,F#... Common Language Runtime (CLR) Include .NET Framework Class Library(FCL)

  4. Programming language use to create application will run in the .NET CLR Evolution of the C & C++ languages Why C# ? Syntax is simple Directly accessing & manipulating system memory Incorporate the best features from other languages & Clearing up their problems

  5. Windows Application Application you can write in C# Web Services Web Application

  6. How a C# program runs?

  7. CLR loader C# Source (.cs) .NET libraries CLR JIT compiler C# compiler Operating system Assembly (.exe or .dll) CPU & other hardware

  8. Write source code c# and saved file with .cs extension C# compiler=> Compile source code to an intermediate language (MSIL) MSIL is contained in an assembly(.exe or .dll extension) Can use source code or reference .NET framework libraries 1 2 3 4

  9. CLR loads assembly & uses JIT compiler to translate MSIL to native machine code MSIL code can execute on any CPUs if CPU is supported by CLR Load .NET libraries if need CLR runs on top of host operating system 5 6 7 8

  10. Powerful, professional Integrated Development Environment (IDE) Integrated compiler, debugger, Other useful tool… Visual Studio 2010 • We can work: • Console application • Window application • Web application • .NET Libraries

  11. Solution ??? Project & Project Properties Visual Studio 2010 Build ??? Debugging???

  12. Solutions and Projects group the items needed to create a program or application: • A Solution can contain one or more Project • A Project represents a particular part of a solution • A Project contains source code file, settings & resource for application • A Project can contain Class Reference libraries • Etc…

  13. How to create Solution & Project?

  14. Solution 1 1. File/New/Project (or Ctrl+ Shift +N) 2. Choose “Visual Studio Solutions” in left panel 3. Enter Name & location solution => click OK

  15. You can see “Solution1” name in the right panel

  16. 2 How To add New Project: Right click on Solution1 Choose Add item Choose New Project

  17. add New Project Dialog You can choose any Application Type name & click OK

  18. Many different projects in the Solution

  19. Problem: You don’t know which Project that you want to run Right click on Project Choose Set as StartUp Project

  20. Problem: We have many Window Computing Platform… Right click on Project & choose Properties To any PC can run your Application, you must config as below

  21. Or Go to menu Project => Choose Project properties

  22. Project Properties dialog Go to Build tab Platform target please choose “Any CPU” Save project

  23. How to add New Item in the Project 1.Right click on Project 2.Choose Add item 3.Choose New Item

  24. Choose any item Enter name and click “Add” button

  25. Reference .NET libraries AssemblyInfo file

  26. Solution Folder content

  27. Project Folder content

  28. How to build Solution & Project Build Solution Build Project Batch Build

  29. Batch Build You should use Batch Build Build You can check or uncheck project to build

  30. How to Debugging?

  31. Choose line you want to start debugging Go to Debug menu Choose Toggle Breakpoint or press F9

  32. Breakpoint here

  33. 4. Go to Debug 5. Choose Start Debugging or press F5 Also you can clear all Breakpoints

  34. You can see The Yellow Line And the name + value of variables

  35. Step Into Step Over Step Out

  36. Use QuickWatch to see detail information of variable at runtime

  37. QuickWatch Dialog here Variable’s infor

  38. You can change value of the variable and click Reevaluate button

  39. END

More Related