以下の内容はhttps://culage.hatenablog.com/entry/2019/06/07/000000_3より取得しました。


C#のリフレクションで private static メソッドを呼び出し、out引数を受け取る方法

using System.Reflection;

private void RunReflection()
{
    MethodInfo hogeMethod = typeof(HogeStaticClass).GetMethod("HogeMethod", BindingFlags.NonPublic | BindingFlags.Static);
    object[] param = new object[] { 5, null };
    hogeMethod.Invoke(this, param);
    Console.WriteLine(param[1]);
}
class HogeStaticClass
{
    private static void HogeMethod(int n, out int m)
    {
        m = n + 1;
    }
}



以上の内容はhttps://culage.hatenablog.com/entry/2019/06/07/000000_3より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14