mbesso mbesso - 1 year ago 80
C# Question

Fastest way to get productive in VS 08 and C#

I have recently been working with Python using Komodo Edit and other simpler editors but now I am doing a project which is to be done in C# using VS 08. I would appreciate any hints on how to get productive on that platform as quickly as possible.

Answer Source

As far as becoming proficient with C# I would highly recommend Programming C# and C# in Depth.

For Visual Studio, start poking around in the IDE a lot, play around, get familiar with it. Start with simple projects and explore all the different aspects. Learn how to optimize Visual Studio and get familiar with some of the great keyboard shortcuts / hidden features of the IDE.

Definitely do each of the following at least once:

Projects:

  • Create a simple console application (e.g. hello world)
  • Create a class library (managed .dll) and use it from another application you create
  • Create a simple windows application
  • Create a simple asp.net web app

Debugging:

  • Debug a command line app
  • Get familiar with: breakpoints, the locals and watch windows, step over, step into, step out of, continue, stop debugging
  • Create a command line app which uses a function in a class library. Store the dll and symbol file (.pdb) for the library but delete the source code, debug through app as it goes into the library
  • Debug into a webservice
  • Learn how to use ILDasm and ILAsm

Command Line:

  • Get familiar with the Visual Studio command line environment
  • Build using only the command line
  • Debug from the command line using devenv.exe /debugexe
  • Use ILDasm / ILAsm from the command line to disassemble a simple app into .IL, reassemble it into a differently named file, test to see that it still works

Testing:

  • Create unit tests (right click in a method, select the option to create a test)
  • Learn how to: run all unit tests, run all unit tests under the debugger, rerun failed unit tests, see details on test failures, run a subset of unit tests
  • Learn how to collect code coverage statistics for your tests

Source Control:

  • Learn how to interact with your source control system of choice while developing using VS

Refactoring et al:

  • Become familiar with all of the built-in refactorings (especially rename and extract method)
  • Use "Go To Definition"
  • Use "Find All References"
  • Use "Find In Files" (ctrl-shift-F)

IDE & Keyboard Shortcuts:

  • Learn how to use the designer well for web and winforms
  • Get very familiar with the Solution Explorer window
  • Experiment with different window layouts until you find one your comfortable with, keep experimenting later to see if that's still the best choice
  • Learn the ins and outs of intellisense, use it to your advantage as much as possible
  • Learn the keyboard shortcut for everything you do
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download