If I have a code like this:
public class Program { public static void Main() { string bar = \"\"; int foo = 24; } }
I think this is because the variable name you see in ILDasm come from the pdb file, not from the assembly itself. If you want to get them, you'll need to read the pdb too.