Import property without using typeof #526
Unanswered
AndriiTomashevskyi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, could you help, please? To add the following line to the target assembly:
this._startTime = DateTime.UtcNow;I use the following code to import the UtcNow property:
var utcNowMethodInfo = typeof(DateTime).GetProperty(nameof(DateTime.UtcNow)).GetGetMethod();var utcNow = moduleDefMD.Import(utcNowMethodInfo )Is there a way to import utcNow without using typeof?
Beta Was this translation helpful? Give feedback.
All reactions