Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
リフレクションを使用してC#で静的クラス初期化子を見つけるにはどうすればよいですか? クラスの型で呼び出されてもGetMembers()、その情報は提供されないようです。
GetMembers()
リフレクションを使用して静的コンストラクターを呼び出す方法を見つけました。これはあなたが探しているものですか。
Type myClass = typeof (MyClass); myClass.TypeInitializer.Invoke(null,null);