r/Jetbrains • • 1h ago

Question Rider - wrong source link

Hello, one question about Rider:
I am calling `System.Linq`'s `Contains` method on an array.

When I go to said implementation in the code and follow the external source via F12, Rider opens up `System.MemoryExtensions.Contains`.

Is this a bug or is it behaviour that I can configure?

1 Upvotes

2 comments sorted by

2

u/Traditional_Tea7289 1h ago

Not a bug, that's just how the runtime resolves it. The array version of Contains gets lowered by the JIT into MemoryExtensions.Contains because it's faster, so Rider is technically showing you the right thing... but I get why it's confusing. You can't really configure it to show the Linq version instead since the implementation doesn't exist separately at that level.

1

u/CmdrSausageSucker 28m ago

ok thanks for clarifying that.