Is Jetbrains dotPeek giving me a warning about my code?
Asked Answered
C

1

14

I was having a look at some of my own code, which I had decompiled with dotPeek.

I keep seeing this:

// ISSUE: method pointer

What does this mean? Is this designed to notify me of an issue with my code?

Thanks

Concessionaire answered 5/12, 2013 at 14:12 Comment(4)
You've got lambda expressions in your code I wager. Not everything can be decompiled into idiomatic C# by dotPeek (yet...)Juju
I have LINQ with method syntax, which I believe uses Lambda behind the scenes.Concessionaire
Can you post part of the code that gives that msg?Faction
@AdarshShah Will post in about 12 hours, late here :)Concessionaire
L
12

This article:

Suggests that you will be seeing these warnings (method pointer), when anonymous methods are used implicitly in your code, which is likely the case with LINQ. It looks like they are getting compiled into explicit method calls, so when you decompile them, you will see lots of garbage unless a decompiler knows how to assemble them back.

I think you are seeing a warning, because dotPeek has a gut feeling that the code was not like that, and so that you are aware of potential issues that may arise. You can see that on the page I referenced the original and generated code pieces are very different, and the latter is very bloated in examples 2 and 3.

Lemus answered 27/12, 2013 at 2:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.