Lập trình visual studio 2010

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

pptx41 trang | Chia sẻ: maiphuongtl | Lượt xem: 2419 | Lượt tải: 1download
Bạn đang xem trước 20 trang tài liệu Lập trình visual studio 2010, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Click to edit Master title style Click to edit Master text styles Second level Third level Fourth level Fifth level 7/24/2014 ‹#› Introduction to the Visual Studio 2010 Chapter 1: What you Learn in this chapter? What’s the .NET Framework & What it contains What C# is &How a C# Program runs Visual Studio 2010 & C# DEMO C# Console .Net Framework [4.0] Microsoft’s Modern software development platform Support several programming languages: C# ,VB, C++,F#... Common Language Runtime (CLR) Include .NET Framework Class Library(FCL) Programming language use to create application will run in the .NET CLR Why C# ? Evolution of the C & C++ languages Incorporate the best features from other languages & Clearing up their problems Syntax is simple Directly accessing & manipulating system memory Application you can write in C# Windows Application Web Application Web Services How a C# program runs? C# Source (.cs) C# compiler Assembly (.exe or .dll) CLR loader CLR JIT compiler Operating system CPU & other hardware .NET libraries 1 Write source code c# and saved file with .cs extension 2 C# compiler=> Compile source code to an intermediate language (MSIL) 3 MSIL is contained in an assembly(.exe or .dll extension) 4 Can use source code or reference .NET framework libraries 5 CLR runs on top of host operating system 6 CLR loads assembly & uses JIT compiler to translate MSIL to native machine code 7 Load .NET libraries if need 8 MSIL code can execute on any CPUs if CPU is supported by CLR Visual Studio 2010 Powerful, professional Integrated Development Environment (IDE) Integrated compiler, debugger, Other useful tool… We can work: Console application Window application Web application .NET Libraries Visual Studio 2010 Solution ??? Project & Project Properties Build ??? Debugging??? 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… How to create Solution & Project? 1 Solution 1. File/New/Project (or Ctrl+ Shift +N) 2. Choose “Visual Studio Solutions” in left panel 3. Enter Name & location solution => click OK You can see “Solution1” name in the right panel How To add New Project: 2 Right click on Solution1 Choose Add item Choose New Project add New Project Dialog You can choose any Application Type name & click OK Many different projects in the Solution Problem: You don’t know which Project that you want to run Right click on Project Choose Set as StartUp Project Problem: We have many Window Computing Platform… To any PC can run your Application, you must config as below Right click on Project & choose Properties Or Go to menu Project => Choose Project properties Project Properties dialog Go to Build tab Platform target please choose “Any CPU” Save project How to add New Item in the Project 1.Right click on Project 2.Choose Add item 3.Choose New Item Choose any item Enter name and click “Add” button AssemblyInfo file Reference .NET libraries Solution Folder content Project Folder content How to build Solution & Project Build Solution Build Project Batch Build Batch Build You should use Batch Build You can check or uncheck project to build Build How to Debugging? Choose line you want to start debugging Go to Debug menu Choose Toggle Breakpoint or press F9 Breakpoint here 4. Go to Debug 5. Choose Start Debugging or press F5 Also you can clear all Breakpoints You can see The Yellow Line And the name + value of variables Step Into Step Over Step Out Use QuickWatch to see detail information of variable at runtime QuickWatch Dialog here Variable’s infor You can change value of the variable and click Reevaluate button END

Các file đính kèm theo tài liệu này:

  • pptxchapter1_introduction_to_the_visual_studio_2010_2t__971.pptx
  • pptxchapter1_working_with_variables_operators_and_expressions_1t__3272.pptx
  • pptxchapter2_windows_forms_and_windows_forms_controls_part_1_2468.pptx
  • pptxchapter2_windows_forms_and_windows_forms_controls_part_2_218.pptx
  • pptxchapter2_windows_forms_and_windows_forms_controls_part_3_7159.pptx
  • pptxchapter2_windows_forms_and_windows_forms_controls_part_4_9863.pptx
  • pptxchapter3_control_statements_handle_exception_3t__3783.pptx
  • pptxchapter4_arrays_and_collections_6t__6843.pptx
  • pptxchapter5_object_oriented_programming_oop_3t__9693.pptx
  • pptxchapter6_string_and_string_manipulations_3t__2944.pptx
Tài liệu liên quan