Created
April 24, 2017 07:49
-
-
Save Criteo-dotnet-blog/06173ca7140a165cd1b1e92dc1fab534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ClrModule GetMscorlib(ClrRuntime runtime) | |
{ | |
foreach (ClrModule module in runtime.Modules) | |
if (module.AssemblyName.Contains("mscorlib.dll")) | |
return module; | |
// Uh oh, this shouldn't have happened. Let's look more carefully (slowly). | |
foreach (ClrModule module in runtime.Modules) | |
if (module.AssemblyName.ToLower().Contains("mscorlib")) | |
return module; | |
// Ok...not sure why we couldn't find it. | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment