C# Fundamentals - Third Edition

Snippet and shortcut keys can help save time while coding in Visual Studio. With snippet keys, enter only a few letters or a keyword and then press tab twice to insert a code fragment.

Example: cw (tab) (tab)

// cw (tab)(tab) : Type cw and then press the tab key twice, the line below will display


Snippet & Shortcut Keys


cw (tab) (tab)


while (tab) (tab)



while (true)



for (tab) (tab)



 for (int i = 0; i < length; i++)



foreach (tab) (tab)



foreach (var item in collection)



do (tab) (tab)





} while (true);

prop (tab) (tab)

public int MyProperty { get; set; }


Will start debugging

(ctrl) + (F5)

Will start without debugging