Char concat

Just in case you haven’t geeked out enough on this question, here’s the IL difference between the two compilers…

VS2013 NETMF

.method public hidebysig static void  Main() cil managed
{
  .entrypoint
  // Code size       24 (0x18)
  .maxstack  2
  .locals init ([0] string s,
           [1] char c)
  IL_0000:  nop
  IL_0001:  ldstr      "11"
  IL_0006:  stloc.0
  IL_0007:  ldc.i4.s   32
  IL_0009:  stloc.1
  IL_000a:  ldloc.0
  IL_000b:  ldloc.1
  IL_000c:  box        [mscorlib]System.Char
  IL_0011:  call       string [mscorlib]System.String::Concat(object,
                                                              object)
  IL_0016:  stloc.0
  IL_0017:  ret
} // end of method Program::Main

VS2015 NETMF

.method public hidebysig static void  Main() cil managed
{
  .entrypoint
  // Code size       31 (0x1f)
  .maxstack  2
  .locals init ([0] string s,
           [1] char c)
  IL_0000:  nop
  IL_0001:  ldstr      "11"
  IL_0006:  stloc.0
  IL_0007:  ldc.i4.s   32
  IL_0009:  stloc.1
  IL_000a:  ldloc.0
  IL_000b:  ldloca.s   c
  IL_000d:  constrained. [mscorlib]System.Char
  IL_0013:  callvirt   instance string [mscorlib]System.Object::ToString()
  IL_0018:  call       string [mscorlib]System.String::Concat(string,
                                                              string)
  IL_001d:  stloc.0
  IL_001e:  ret
} // end of method Program::Main

I’m no IL expert, but both where the char value is loaded from (at IL_000b), and how it is typed is different. The Win32 IL in VS2015 is exactly the same as the NETMF IL, but the Win32 JIT’er handles this case correctly, and the NETMF interpreter does not, so there may be a fix needed in the NETMF interpreter. Now, that fix MAY have already occurred in the 4.4 code, and if so, I am sure they will say so on the issue that I opened.