0

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?

Andrii
  • 689
  • 1
  • 6
  • 12

0 Answers0