StudyMaterial.CodeSnippets

Home > Preview

The flashcards below were created by user mateotete on FreezingBlue Flashcards.


  1. What are code snippets and how do we use them in Visual Studio?
    They are short bits of code which get generated using a few characters followed by pressing the tab button twice. For example, to create a class or property, you could type class+tab+tab or propg+tab+tab.
  2. What are class and class associated snippet commands? (hint: 4)
    • 1. class
    • 2. ctor (constructor)
    • 3. prop
    • 4. propg
  3. What are looping snippet commands? (hint: 4)
    • 1. for
    • 2. foreach
    • 3. do
    • 4. while
  4. What are commonly used code snippet commands not associated with a class or loop? (hint: 8)
    • 1. try/tryf
    • 2. switch
    • 3. else
    • 4. enum
    • 5. struct
    • 6. interface
    • 7. indexer
    • 8. cw (Console.Write())
  5. What are the top 8 keyboard shortcuts?
    • 1. ALT+LEFT ARROW (move forward in history)
    • 2. ALT+RIGHT ARROW (move backwards in history)
    • 3. CTRL+C (copy current line/item)
    • 4. CTRL+V (paste current line/item)
    • 5. CTRL+SHIFT+S (save all files in solution)
    • 6. CTRL+TAB (next tab)
    • 7. CTRL+ (move forward to last location)
    • 8. CTRL- (move backwards to last location)
  6. How to you properly setup a solution with multiple projects in Visual Studio?
    • Start by creating an empty solution and naming it like so, Acme.Industries
    • Next, add each project to this solution with a minimum of 4-5 projects, each titled similarly to the solution but with additional wording, such as Acme.Industries (root) and Acme.Industries.Web.
    • Most all projects will use the Core project which contains enumeration, extensions, utilities and more, so make sure to include a reference to this root project.
  7. If you forget a particular code snippet or want to see if one exists, what snippet is needed to view ALL code snippets for various languages and technologies?
    CTRL+K+X. 

    This will give you intellisense values for C#, Testing, MVC, and others including those for loops, events, delegates, classes, and much more.
  8. What shortcut should you use to comment or un-comment lines of code?
    • CTRL+K followed by CTRL+C 
    • CTRL+K followed by CTRL+U
  9. What shortcut is used to select the current line? How about those above or below?
    • SHIFT+HOME
    • SHIFT+END
    • SHIFT+ALT+UP ARROW
    • SHIFT+ALT+DOWN ARROW
  10. What are the 7 standard projects added to a base Acme Solution? Describe each.
    • 1. Acme.Core - extensions, services, utilities
    • 2. Acme.Data - edmx file, dbContext, table classes, repository, irepository
    • 3. Acme.Model - entities
    • 4. Acme.Presentation - UI, webpages, images, style
    • 5. Acme.ScratchPad - example work
    • 6. Acme.UnitTest - used to validate domain model
    • 7. Acme.WebService - published to IIS

Card Set Information

Author:
mateotete
ID:
335110
Filename:
StudyMaterial.CodeSnippets
Updated:
2017-10-30 00:57:32
Tags:
Code snippets
Folders:

Description:
Code snippets, shortcuts, and program setup instructions for solutions and projects.
Show Answers:

Home > Flashcards > Print Preview