Today I had an interesting bug to fix:

Today I had an interesting bug to fix:

I used a form’s Classname to persist its size in the registry and wondered why it didn’t work. Looking at the registry entries I found, that there was an entry with the class name suffixed by a ‘!dx’.
http://blog.dummzeuch.de/2015/11/19/classname-with-dx-suffix/

Comments

  1. Changing the class name at runtime is very risky. Even for debugging purposes, I would not use this trick: a dedicated and separated string list is enough.

    ReplyDelete
  2. Always fun when debugging code slips into production. Though changing the classname sounds very nasty.

    ReplyDelete
  3. I'm not going to name the guy who submitted it. Let's just say I'd still accept a contribution from him any time.

    ReplyDelete
  4. Wouldnt be better if you use for every form a own const instead of classname? Just rename the forms classname and your data storage algorithm dont work any longer.

    ReplyDelete
  5. Fabian S. Biehn I don't really care if it does not work once, because I renamed a form (nobody will notice). I care about it working in all other cases.

    ReplyDelete

Post a Comment