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 )

Monday, April 5, 2010

C# implicit conversion

Even in this scenario where b and c are both byte variables

c = b + 64;

C# converts the result of the calculation to int, and then complains that you're assigning int to byte. Casting 64 to (byte) doesn't help either, you have to say

c = (byte) (b + 64);

ffs.

Followers

Blog Archive