Shortcut | Description | Type | Insertion Locations |
---|---|---|---|
#if | #if/#endif directive | E, S | Anywhere |
#region | #region/#endregion directive | E, S | Anywhere |
~ | destructor | E | Inside a class |
Attribute | attribute (using recommended pattern) | E | Inside a namespace (including the global namespace), a class, or a struct |
checked | checked block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
class | class declaration | E, S | Inside a namespace (including the global namespace), a class, or a struct |
ctor | constructor | E | Inside a class |
cw | Console.WriteLine | E | Inside a method, an indexer, a property accessor, or an event accessor |
do | do...while loop | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
else | else statement | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
enum | enum declaration | E, S | Inside a namespace (including the global namespace), a class, or a struct |
equals | implementing Equals() according to guidelines | E | Inside a class or a struct |
Exception | exception | E | Inside a namespace (including the global namespace), a class, or a struct |
for | 'for' loop | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
foreach | foreach statement | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
forr | reverse 'for' loop | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
if | if statement | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
indexer | indexer declaration | E | Inside a class or a struct |
interface | interface declaration | E, S | Inside a namespace (including the global namespace), a class, or a struct |
invoke | safely invoking an event | E | Inside a method, an indexer, a property accessor, or an event accessor |
iterator | simple iterator | E | Inside a class or a struct |
iterindex | 'named' iterator/indexer pair using a nested class | E | Inside a class or a struct |
lock | lock block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
mbox | MessageBox.Show (requires reference to System.Windows.Forms) | E | Inside a method, an indexer, a property accessor, or an event accessor |
namespace | namespace declaration | E, S | Inside a namespace (including the global namespace) |
prop | automatically implemented property | E, V3+ | Inside a class or a struct |
propfull | property and backing field | E | Inside a class or a struct |
propg | autoproperty with a 'get' accessor and a private 'set' accessor | E, V3+ | Inside a class or a struct |
sim | 'static int Main()' method declaration | E | Inside a class or a struct |
struct | struct declaration | E, S | Inside a namespace (including the global namespace), a class, or a struct |
svm | 'void Main' method declaration | E | Inside a class or a struct |
switch | switch statement block | E | Inside a method, an indexer, a property accessor, or an event accessor |
testc | MSTest test class | E | |
testm | MSTest test method | E | |
try | try catch block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
tryf | try finally block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
unchecked | unchecked block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
unsafe | unsafe block | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
using | using block | E, S | Inside a namespace (including the global namespace) |
while | while loop | E, S | Inside a method, an indexer, a property accessor, or an event accessor |
E - Expansion, S - Surrounds With (Ctrl-K, Ctrl-S), V3+ - Requires C# 3.0 or higher
0 comments:
Post a Comment