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# properties

You can't have just a get or set accessor with auto properties (because without an underlying variable there's no way to perform the opposite operation even inside the class). But this is acceptable:

public int Regenerations { get; protected set; }

Btw, the expanded syntax is eg

public int Incarnation {
get { return _incarnation; }
set {
if (value == 4) DonScarf();
_incarnation = value;
}
}

Followers

Blog Archive