Created
February 1, 2019 12:45
-
-
Save kevingosse/a4a59fafd4145eed067b3909ed3a862e 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
internal class StartupHook | |
{ | |
public static void Initialize() | |
{ | |
var type = Type.GetType("System.Array+EmptyArray`1"); | |
var arrayStringType = type.MakeGenericType(typeof(string)); | |
var field = arrayStringType.GetField("Value", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); | |
field.SetValue(null, new string[] { "Hello world!" }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment