www.nickhodge.com

microsoft, munging and on being a mercurial iconoclastic professional geek.

T40T, 6th June 2008 to 9th June 2008

without comments

Csharp kitteh

(kit­teh codez: ./;;;;;;;;;;;;;;;;;;;;)

Time to start C# famil­i­ar­isa­tion, this long week­end is the week­end to start. My guide is the book: “Pro C# 2008 and the .Net 3.5 Plat­form” writ­ten by Andrew Troel­son

Hav­ing last been semi-professional in Java about 10 years ago, there are many sim­il­ar­it­ies. But lots of new plat­form learn­ings. Unix shell, paths and com­mands are dif­fi­cult things to dump.

Just ensur­ing I under­stand the fun­da­ment­als before I jump into the deep end of the BCL and other .Net goodness

So, some new things:

  • using the Visual Stu­dio Com­mand Prompt to pre-setup paths
  • @*.rsp files for input to csc.exe (to replace com­mand lines)
  • Con­sole.* and Envir­on­ment.* for command-line/console style apps; along with return values
  • Escape char­ac­ters vs. @”sss” ver­batim strings
  • Narrowing/Widening data­types at com­pile time (short/ints)
  • out, ref, params (leave params as last argument)
  • oper­ator over­load­ing (sans gen­er­ics), arrays, simple objects, enums’
  • structs on the stack, vs ref­er­enced types on heap
  • Nul­lable types (using ? at the end of the type declar­a­tion, ?? as default over­ride if value is null)
  • Objects, default constructors
  • con­structor chain­ing using this. keyword
  • Encap­su­la­tion using prop­er­ties (auto get­ters and set­ters, or Accessors and Mutators)
  • par­tials (one class across mul­tiple *.cs files)
  • class dia­grams; same 3 base things of OO pro­gram­ming (encap­su­la­tion, inher­it­ance and poly­morph­ism)
  • base class construction
  • nes­ted classes
  • vir­tual, over­ride in poly­morph­ism; as keyword + null test in polymorphism
  • SEH. Struc­tured excep­tion handling
  • The heap, gen­er­a­tions as a method of mark­ing objects as “more likely to stick around” in System.GC
  • Final­ize. Final­ize when unman­aged (ie: Pin­voke) objects
  • Dis­pose. call Dis­pose on an object that imple­ments IDispos­able (if x is IDisposable…)

Inspecting ur classes

New fea­ture of Visual Stu­dio 2008, LOLCAT edi­tion. CATROSPECSHUN OV UR CLASSEZ

Written by Nick Hodge

June 8th, 2008 at 6:47 pm

Posted in c#,t40t