pretty formating is little buggy, maybe you should leave it as is ;)
if we declare variable outside lock, then do something inside lock, and later invoke it on another thread decompiled code is broken.
as you can see there is no variable declaration before lock context block, instead its moved inside lock context block.
resulting in error in compiler since call to DoDrawWork is outside lock context block:
>> error CS0103: The name 'num' does not exist in the current context
also what is that italic text!?
what have you done with increment?