コンストラクタは次のようになります。
public NameAndValue(string name, string value)
Reflection を使用して MethodInfo として取得する必要があります。以下を試しましたが、コンストラクターが見つかりません ( GetMethod
return null
)。
MethodInfo constructor = typeof(NameAndValue).GetMethod(".ctor", new[] { typeof(string), typeof(string) });
私は何を間違っていますか?