Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why a filed in the same module is a MemberRef? #60

Closed
CreateAndInject opened this issue Apr 26, 2016 · 1 comment
Closed

Why a filed in the same module is a MemberRef? #60

CreateAndInject opened this issue Apr 26, 2016 · 1 comment

Comments

@CreateAndInject
Copy link
Contributor

There is a stsfld and a ldsfld in the same module, and the operand is the same field.
But one is FileDef, another is MemberRef, so when I compare them use "==", it tell me false.

Maybe dnlib should use IMemberDef if one reference is defined in the current module, at least tell me true when I use "==".

@0xd4d
Copy link
Collaborator

0xd4d commented May 4, 2016

No, a FieldDef can never be a MemberRef and if you compare references, it will always, and must always, return false. Use SigComparer to compare fields, methods, types...

@0xd4d 0xd4d closed this as completed Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant