VS-KB-Brochure-CSharp-Letter-HiRez.pdf

(2588 KB) Pobierz
VS KB Brochure C#_Letter.indd
Microsoft ® Visual C# ® Default Key Bindings
Editing
Edit.CollapseTo-
Defi nitions
Edit.Toggle-
CompletionMode
CTRL + ALT +
SPACEBAR
Toggles between suggestion mode
(all commit characters except for
tab leave entered text as-is, tab
chooses a completion item in the
list) and completion mode.
Edit.GoToNext-
Location
F8
Moves the caret to the next item,
such as a task in the Task List
window or a search match in the
Find Results window. Subsequent
invocations will move to the next
item in the list.
CTRL + M, O Collapses declaration bodies to
provide a high-level view of the
types and members in the source
fi le.
Edit.HideSelection CTRL + M, CTRL + H Collapses current selection to an
outlining region.
Creates a box selection instead of a
stream selection.
Edit.<Direction>
ExtendColumn
SHIFT + ALT +
<ARROW KEY>
Edit.Incremental-
Search
CTRL + I Activates incremental search. If
incremental search is on, but no
input is passed, the previous search
query is used. If search input has
been found, next invocation
searches for the next occurrence of
the input text.
Edit.ToggleAll-
Outlining
CTRL + M, L Toggles all previously collapsed
outlining regions between
collapsed and expanded states.
File
File.NewProject CTRL + SHIFT + N Displays the New Project dialog
box.
File.OpenProject CTRL + SHIFT + O Displays the Open Project dialog
box, where existing projects can be
added to the solution.
Project.AddClass SHIFT + ALT + C Displays the Add New Item dialog
box and selects Class template as
default.
CTRL + M, M Toggles the currently selected
collapsed region between the
collapsed and expanded state.
Edit.StopOutlining CTRL + M, P Removes all outlining information
from the whole document.
Edit.Toggle-
OutliningExpansion
Edit.FindNext,
Edit.FindPrevious
F3 and SHIFT + F3 Searches again for the last search
pattern in the direction specifi ed.
Edit.FindNext-
Selected,
Edit.FindPrevious-
Selected
CTRL + SHIFT + F3 Sets the search pattern to the
selected text, then search in the
direction specifi ed.
Edit.Comment-
Selection
CTRL + K, C or
CTRL + E, C
Inserts // at the beginning of the
current line or every line of the
current selection.
Project.Add-
ExistingItem
SHIFT + ALT + A Displays the Add Existing Item
dialog box, where existing fi les can
be added to the current project.
View.Forward-
BrowseContext
CTRL + SHIFT + 7 Moves to the next item called in
code in the current fi le. Uses the Go
To Defi nition navigation stack.
Edit.Uncomment-
Selection
CTRL + K, U or
CTRL + E, U
Removes the // at the beginning of
the current line or every line of the
current selection.
Project.Add-
NewItem
CTRL + SHIFT + A Displays the Add New Item dialog
box, where a new fi le can be added
to the current project.
View.PopBrowse-
Context
CTRL + SHIFT + 8 Moves to the previous item called in
code in the current fi le. Uses the Go
To Defi nition navigation stack.
Edit.Format-
Document
CTRL + K, D or
CTRL + E, D
Formats the current document
according to the indentation and
code formatting settings specifi ed
on the Formatting pane under
Tools | Options | Text Editor | C# .
Window.ShowEz-
MDIFileList
CTRL + ALT +
DOWN ARROW
Displays a pop-up listing of all open
documents.
View.Navigate-
Backward
CTRL + HYPHEN (-) Moves to the previously browsed
line of code.
Moves to the next browsed line of
code.
Edit.FindInFiles CTRL + SHIFT + F Displays the Find in Files tab of the
Find and Replace dialog box.
Edit.FindSymbol ALT + F12 Displays the Find Symbol pane of
the Find and Replace dialog box.
CTRL + SHIFT +
HYPHEN (-)
according to the indentation and
code formatting settings specifi ed
on the Formatting pane under
Tools | Options | Text Editor | C# .
Edit.InsertSnippet CTRL + K, X Displays the Code Snippet Picker.
The selected code snippet will be
inserted at the caret position.
Edit.SurroundWith CTRL + K, S Displays the Code Snippet Picker.
The selected code snippet will be
wrapped around the selected text.
CTRL + E, F Formats the current selection
IntelliSense
Edit.CompleteWord CTRL + SPACEBAR
or CTRL + K, W
Completes the current word in the
completion list.
Invokes the IntelliSense ®
completion list.
Edit.QuickInfo CTRL + K, I Displays the complete declaration
for the specifi ed identifi er in your
code in a Quick Info tooltip.
View.ViewCode F7
Displays the selected item in Code
view of the editor.
View.ViewDesigner,
View.ViewMarkup
SHIFT + F7 Switches between Design and
Source views for the current
document
Edit.ParameterInfo CTRL + SHIFT +
SPACEBAR or
CTRL K, P
Displays the name, number, and
type of parameters required for the
specifi ed method.
Edit.InvokeSnippet-
FromShortcut
TAB
Inserts the expanded code snippet
from the shortcut name.
CTRL + F2 Moves focus to the drop-down bar
located at the top of the editor
when the editor is in Code view or
Server Code view.
Edit.Find CTRL + F Displays the Find Quick tab of the
Find and Replace dialog box.
Edit.GoTo CTRL + G Displays the Go to Line dialog box.
Edit.GoToFind-
Combo
Make Completion
List Transparent
CTRL
Causes a visible completion list to
become transparent.
CTRL + SHIFT + V Pastes text from the Clipboard ring
to the caret location in the fi le.
Subsequent use of the shortcut key
iterates through the items in the
Clipboard ring.
Edit.Replace CTRL + H Displays the replace options in the
Quick Replace tab of the Find and
Replace dialog box.
Edit.ReplaceInFiles CTRL + SHIFT + H Displays the replace options on the
Replace in Files tab of the Find
and Replace dialog box.
Navigation
Edit.NavigateTo CTRL + COMMA (,) Displays the NavigateTo window,
which allows quick navigation to
fi les, types, and members. The word
at the caret seeds the search.
CTRL + / Moves focus to the Find/Command
box on the Standard toolbar.
the symbol selected.
Edit.GoToBrace CTRL + ] Moves the caret location to the
matching brace in the source fi le.
CTRL + K, R Displays a list of all references for
EditorContext-
Menus.Code-
Window.ViewCall-
Hierarchy
CTRL + K, T Brings focus to the Call Hierarchy
window using the member at the
caret as a top-level node.
View.Show-
SmartTag
CTRL + PERIOD (.)
or SHIFT + ALT +
F10
Displays the available options on
the Smart Tag menu.
Edit.NextHighlight-
edReference,
Edit.PreviousHigh-
lightedReference
CTRL + SHIFT +
DOWN ARROW
and CTRL + SHIFT
+ UP ARROW
Moves the caret to the next or
previous highlighted identifi er
matching the current one.
Edit.GoToDefi nition F12
Navigates to the declaration for the
selected symbol in code.
VS KB Brochure C# _ Letter. i ndd 2
7/2/10 3:53 PM
CTRL + F3 and
View.Navigate-
Forward
CTRL + K, F or
Edit.Format-
Selection
Edit.ListMembers CTRL + J or
CTRL + K, L
Window.MoveTo-
NavigationBar
Edit.Cycle-
ClipboardRing
SHIFT + F12 or
Edit.FindAll-
References
736000691.040.png 736000691.041.png 736000691.042.png 736000691.043.png 736000691.001.png 736000691.002.png 736000691.003.png 736000691.004.png 736000691.005.png 736000691.006.png 736000691.007.png 736000691.008.png 736000691.009.png 736000691.010.png 736000691.011.png 736000691.012.png 736000691.013.png 736000691.014.png 736000691.015.png 736000691.016.png 736000691.017.png
Window
View.ClassView CTRL + W, C Displays the Class View window.
View.Code-
Defi nitionWindow
Debugging
Debug.Autos CTRL+D, A Displays the Autos window, which
displays variables used in the current line
of code and the preceding line of code.
Debug.CallStack CTRL+D, C Displays the Call Stack window,
which displays a list of all active
methods or stack frames for the
current thread of execution.
Debug.Immediate CTRL+D, I Displays the Immediate window,
where expressions can be evaluated.
Debug.Locals CTRL+D, L Displays the Locals window, which
displays the local variables and their
values for each method in the
current stack frame.
Debug.QuickWatch CTRL+D, Q Displays the QuickWatch dialog
box that has the current value of
the selected expression.
Refactoring
CTRL + W, D Displays the Code Defi nition
window.
View.ErrorList CTRL + W, E Displays the Error List window.
View.ObjectBrowser CTRL + W, J Displays the Object Browser .
View.Output CTRL + W, O Displays the Output window, where
status messages can be viewed at
run time.
CodeRush Xpress is a free plug-in from Developer Express
Inc., in partnership with Microsoft. CodeRush Xpress
supports more than 50 refactoring features. See www.
devexpress.com/Products/Visual_Studio_Add-in/
CodeRushX/ for more information.
Refactor.-
EncapsulateField
CTRL + R, E Displays the Encapsulate Field
dialog box, which allows creation
of a property from an existing fi eld
and updates all references to use
the new property.
View.Properties-
Window
CTRL + W, P Displays the Properties window,
which lists the design-time
properties and events for the
currently selected item.
Refactor.Extract-
Interface
CTRL + R, I Displays the Extract Interface
dialog box, which allows creation
of a new interface with members
derived from an existing class,
struct, or interface.
CTRL + W, S Displays Solution Explorer , which
lists the projects and fi les in the
current solution.
View.TaskList CTRL + W, T Displays the Task List window,
which displays custom tasks,
comments, shortcuts, warnings, and
error messages.
View.Toolbox CTRL + W, X Displays the Toolbox , which
contains controls that can be
included or used with your code.
View.ServerExplorer CTRL + W, L Displays Server Explorer , which lets
you view and manipulate database
servers, event logs, message queues,
Web services, and other operating
system services.
Refactor.Extract-
Method
CTRL + R, M Displays the Extract Method dialog
box, which allows creation of a new
method from the selected code.
Debug.Start F5
Launches the application under the
debugger based on the settings from
the startup project. When in Break
mode, invoking this command will run
the application until the next breakpoint.
CTRL + R, V Displays the Remove Parameters
dialog box, which allows removal of
parameters from methods, indexers,
or delegates by changing the
declaration at any locations where
the member is called.
Refactor.Rename CTRL + R, R or F2 Displays the Rename dialog
box, which allows renaming all
references for an identifi er.
Debug.Start-
WithoutDebugging
CTRL+F5 Launches the application without
invoking the debugger.
Debug.StepInto F11
Executes code one statement at a
time, following execution into
method calls.
Refactor.Reorder-
Parameters
CTRL + R, O Displays the Reorder Parameters
dialog box, which allows changes
to the order of the parameters for
methods, indexers, and delegates.
SHIFT+ALT+F11 Prompts to select which sub
expression to step into, regardless
of the tools options setting for
skipping properties and operators.
Debug.StepOut SHIFT+F11 Executes the remaining lines of a
method in which the current
execution point is located.
Window.CloseTool-
Window
SHIFT + ESC Closes the current tool window.
Data.ShowData-
Sources
SHIFT + ALT + D Displays the Data Sources window.
Refactor! CTRL +
BACKQUOTE (`)
Invokes available Developer Express
Inc. refactorings when it is installed.
Window.Close-
DocumentWindow
CTRL + F4 Closes the current tab.
Build
Build.BuildSolution F6 or
CTRL+SHIFT+B
CTRL + TAB Displays the IDE Navigator , with
the fi rst document window selected.
View.CallHierarchy CTRL + W, K Displays the Call Hierarchy
window, which lists callers and
callees for a given member.
Debug.StepOver F10
Executes the next line of code, but
does not follow execution through
any method calls.
Builds all the projects in
the solution.
Build.BuildSelection SHIFT+F6 Builds the selected project
and its dependencies.
Debug.Stop-
Debugging
SHIFT+F5 Stops running the current
application under the debugger.
View.ZoomIn,
View.ZoomOut
CTRL + SHIFT +
PERIOD (.) and
CTRL + SHIFT +
COMMA (,)
Increases (>) or decreases (<) the
size of contents in the editor.
F9 Sets or removes a breakpoint at the
current line.
Debug.Watch CTRL+D, W Displays the Watch window, which
displays the values of selected
variables or watch expressions.
Note: You can choose to use these key bindings from the Visual
C# Development Settings. To change these settings, go to Tools
| Import and Export Settings... and select Reset All Settings .
Then select Visual C# Development Settings . You could also
import only the key bindings by selecting Import Selected
Environment Settings instead of Reset All Settings . To
customize individual key bindings, go to Tools | Options |
Environment | Keyboard .
Debug.Enable-
Breakpoint
CTRL+F9 Toggles the breakpoint between
disabled and enabled.
Make Datatip
Transparent
[CTRL]
Causes a visible datatip to become
transparent.
Test.RunTestsIn-
CurrentContext
CTRL+R, T Runs the unit test containing
the caret.
Test.RunAllTests-
InSolution
CTRL+R, A Runs all of the unit tests in
the solution.
© 2009 Microsoft Corporation. All rights reserved. Microsoft,
IntelliSense, Visual C#, Visual Studio, and the Visual Studio
logos are trademarks of the Microsoft group of companies.
All other trademarks are the property of their
respective owners.
VS KB Brochure C# _ Letter. i ndd 1
7/2/10 3:54 PM
View.Solution-
Explorer
Refactor.Remove-
Parameters
Debug.Step-
IntoSpecifi c
Window.NextDocu-
mentWindowNav
Debug.Toggle-
Breakpoint
736000691.018.png 736000691.019.png 736000691.020.png 736000691.021.png 736000691.022.png 736000691.023.png 736000691.024.png 736000691.025.png 736000691.026.png 736000691.027.png 736000691.028.png 736000691.029.png 736000691.030.png 736000691.031.png 736000691.032.png 736000691.033.png 736000691.034.png 736000691.035.png 736000691.036.png 736000691.037.png 736000691.038.png 736000691.039.png
Zgłoś jeśli naruszono regulamin