Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm arriving a bit late to the party, but I've got <strike>three</strike> <strike>four</strike> five:</p> <ol> <li><p>If you poll InvokeRequired on a control that hasn't been loaded/shown, it will say false - and blow up in your face if you try to change it from another thread (<a href="https://stackoverflow.com/questions/246058/system-invalidoperationexception-the-object-is-currently-in-use-elsewhere-ho">the solution</a> is to reference this.Handle in the creator of the control).</p></li> <li><p>Another one which tripped me up is that given an assembly with:</p> <pre><code>enum MyEnum { Red, Blue, } </code></pre> <p>if you calculate MyEnum.Red.ToString() in another assembly, and in between times someone has recompiled your enum to:</p> <pre><code>enum MyEnum { Black, Red, Blue, } </code></pre> <p>at runtime, you will get "Black".</p></li> <li><p>I had a shared assembly with some handy constants in. My predecessor had left a load of ugly-looking get-only properties, I thought I'd get rid of the clutter and just use public const. I was more than a little surprised when VS compiled them to their values, and not references.</p></li> <li><p>If you implement a new method of an interface from another assembly, but you rebuild referencing the old version of that assembly, you get a TypeLoadException (no implementation of 'NewMethod'), even though you <em>have</em> implemented it (see <a href="https://stackoverflow.com/questions/948785/typeloadexception-says-no-implementation-but-it-is-implemented">here</a>).</p></li> <li><p>Dictionary&lt;,>: "The order in which the items are returned is undefined". This is <em>horrible</em>, because it can bite you sometimes, but work others, and if you've just blindly assumed that Dictionary is going to play nice ("why shouldn't it? I thought, List does"), you really have to have your nose in it before you finally start to question your assumption.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload