Tuesday, 18 March 2008

Things I need to learn more about

Following on from a conversation I had yesterday, I realise there are some areas of .NET that I don't understand as well as I might:

  • Passing by reference and by value
  • The Garbage Collector
  • Re-using ASP.NET user controls

You usually know what you know, but it is helpful to know what you don't know too.

3 comments:

David Gardiner said...

And write SQL statements with LEFT/RIGHT/INNER/OUTER JOINs by hand and have a fair idea of what to expect (instead of just relying on the tool to generate it for you)

Webmonkey-in-Ireland said...

Passing byref and byval is pretty easy to understand..

By reference is a pointer to a variable so mainly I would just use it (in a function context), when the function needs to alter the content of more than just one (object) variable.

Byval is the more common of the two, and creates a copy of the variable passed into the function, which can be modified independant of the original variable.

You'll find that ByRef is used more in Subs than functions.

David Gardiner said...

Yeah.. I guess I mean understand at the CLR-level. I know the difference when I'm coding, but I was meaning I should also understand what is going on under the hood to achieve the functionality of ByVal and ByRef (eg. how it affects the stack and heap etc).