Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.

Quick

  • ($a, $b....) = unpack("A2A7...", $packed)
  • push( array, list )

Saturday, April 24, 2010

C# constructors

One version of an overloaded constructor can call another thusly:

public class Doctor {

public Doctor(int incarnation) {
...
}

public Doctor(): this(1) {
...
}

}

ie Doctor() makes a call Doctor(1) - this happens before the body of Doctor() executes.

The colon syntax is the same as used for calling a base class constructor in an inheriting class.

Followers

Blog Archive