How can we help you today? How can we help you today?

[Bug?] [.Net 4.0] No return statement in disassembled code

Hello,

not sure if it is a bug or a new feature of the .Net 4.0 framework but the disassembled code for the DataTemplateSelector.DataTemplate() method does not contain any return statement, making the code invalid.

.Net framework version : 4.0.30319
Assembly : PresentationFramework.dll
Class : System.Windows.Controls.DataTemplateSelector
Method : SelectTemplate
.Net reflector version : 6.1.0.11

Thanks in advance for your feedback.
serious
0

Comments

2 comments

  • Clive Tong
    I think this is probably because you are looking at a "reference assembly" instead of the real framework assembly. Reference Assemblies, stored in C:\Program Files\Reference Assemblies, contain the metadata, but don't contain any of the IL instructions.

    When I look at the true assembly, your method contains the code "return null", but when I look at the reference assembly, I see no code as you do.
    Clive Tong
    0
  • serious
    Ok, seems like I was not disassembling the good one.

    Thanks.
    serious
    0

Add comment

Please sign in to leave a comment.