Living with VS 2005 CS3215 and C - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Living with VS 2005 CS3215 and C

Description:

Tips. Useful Add-ins and Third Party Tools. VS 2005 Working Environment. Main Explorer Windows ... 3215/vs.ppt. Share your tips and post them in the forum ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 18
Provided by: compN
Category:
Tags: cs3215 | living | tips

less

Transcript and Presenter's Notes

Title: Living with VS 2005 CS3215 and C


1
Living with VS 2005 - CS3215 and C
  • Liu Yang

2
Outline
  • VS 2005 Working Environment
  • View Windows
  • Customized Settings
  • Code Editing
  • Code Navigation and Searching
  • Refactor
  • Snippets
  • Debugging
  • Tips
  • Useful Add-ins and Third Party Tools

3
VS 2005 Working Environment
  • Main Explorer Windows
  • Code Editor (F7)
  • Design Editor (Shift - F7)
  • Solution Explorer (Ctrl-W, S)
  • Class View (Ctrl-W, C)
  • Object Browser (Ctrl-W, J)
  • Help Windows
  • Error List (Ctrl-W, E)
  • Output (Ctrl-W, O)
  • Property Window (F4)
  • Task List (Ctrl-W, T) HACK, UNDONE, TODO
  • Full Screen Window (Shift Alter Enter)
  • Customized Toolbar and Settings

4
Outline
  • VS 2005 Working Environment
  • View Windows
  • Customized Settings
  • Code Editing
  • Code Navigation and Searching
  • Refactor
  • Snippets
  • Debugging
  • Tips
  • Useful Add-ins and Third Party Tools

5
Code Editing
  • Format Code
  • Ctrl-A, S, X, C, V, Z, Y, F, H, N
  • Ctrl-E, F to format selection
  • Ctrl-E, D to format document
  • Add Comment
  • Ctrl-E, C to comment out the selection
  • Ctrl-E, U to un-comment of the selection
  • Navigation
  • Navigate Forward / Backward
  • Use BookMarks
  • Go to Definition (F12)
  • Find All References
  • Go to Line Ctrl-G

6
Code Editing
  • Outlining
  • Toggle Outlining expansion Ctrl M, M
  • Toggle All Outlining Ctrl M, L
  • Stop Outlining Ctrl M, P
  • IntelliSences
  • IntelliSense provides an array of features that
    make language references easily accessible.
  • Search
  • Ctrl-F to Search
  • F3 for fast find next
  • Ctrl-H for quick replace
  • Windows Navigation

7
Class Diagram
  • Create Class Diagram for your project
  • Using the Class Diagram to synchronize with your
    code.

8
Using Refactor
  • Refactoring is the process of rewriting a
    computer program or other material to improve its
    structure or readability, while explicitly
    preserving its meaning or behavior.
  • Rename (F2)
  • Extract Method (Ctrl-R, M)
  • Encapsulate Field (Ctrl-R, E)
  • Extract Interface (Ctrl-R, I)
  • Promote Local Variable to Parameter (Ctrl-R, P)
  • Remove Parameter (Ctrl-R, V)
  • Reorder Parameter (Ctrl-R, O)

9
Code Snippets
  • IntelliSense Code Snippets are reusable,
    task-oriented blocks of code.
  • Use snippets
  • 1 In the Code Editor, place the cursor where you
    would like to insert the code snippet
  • Type CTRLK, CTRLX, or
  • Right mouse click to select insert snippet
  • Select the code snippet / type the name and then
    press TAB or ENTER.
  • 2 Type the key word directly, and select the
    word, and then press TAB, TAB
  • Sround With
  • Snippets Management
  • Create snippets
  • http//msdn2.microsoft.com/en-us/library/ms165393(
    VS.80).aspx

10
Outline
  • VS 2005 Working Environment
  • View Windows
  • Customized Settings
  • Code Editing
  • Code Navigation and Searching
  • Refactor
  • Snippets
  • Debugging
  • Tips
  • Useful Add-ins and Third Party Tools

11
Debugging
  • Add Break Points (F9)
  • Conditions
  • Location
  • Hit Count
  • Filter
  • Write Code to Output
  • Debug.WriteLine("Debugging Test")
  • Trace.WriteLine("Trace Information-Product
    Starting ")
  • Start Debugging (F5)
  • Step Into (F11)
  • Step Over (F10)
  • Quick Watch
  • Add Watch
  • Quick Build (Ctrl-Shift B / F6)

12
Outline
  • VS 2005 Working Environment
  • View Windows
  • Customized Settings
  • Code Editing
  • Code Navigation and Searching
  • Refactor
  • Snippets
  • Debugging
  • Tips
  • Useful Add-ins and Third Party Tools

13
Tips
  • How to do box/column selection?
  • Alt or Shift-Alt cursor
  • How to bind keyboard shortcuts to commands?
  • Go to Tools Options and choose Environment
    Keyboard
  • Either select the command from the list or type
    in the command name in the edit box above it
  • In the Press shortcut key(s), press the
    keyboard shortcut you want to associate with the
    currently selected command
  • Play all the Ctrl key
  • Use F2 to F12
  • Put frequent used function on the toolbar
  • Dont pass your DLL and Exe around, which can be
    easily decompiled back to complete source code.

14
Outline
  • VS 2005 Working Environment
  • View Windows
  • Customized Settings
  • Code Editing
  • Code Navigation and Searching
  • Refactor
  • Snippets
  • Debugging
  • Tips
  • Useful Add-ins and Third Party Tools

15
Useful Add-ins and Third Party Tools
  • Resharper
  • Error Highlighting and Quick-Fixes
  • Advanced Coding Assistance
  • Numerous Refactorings
  • Navigation and Search
  • Unit Testing
  • Visual Assist X
  • Read Code Faster with Enhanced Syntax Coloring
  • Write Code Faster with Acronyms and Shorthand
  • Write Code Faster with Suggestions
  • Navigate Code Faster with Find References
  • Dynamic Spell checking
  • dotTrace
  • Memory profiling
  • Performance profiling enhancements
  • Multiple snapshots

16
  • The PPT can be found
  • www.comp.nus.edu.sg/liuyang/3215/vs.ppt
  • Share your tips and post them in the forum

17
Thank You
Write a Comment
User Comments (0)
About PowerShow.com