Instantiating Internal class with private constructor

前端 未结 5 993
挽巷
挽巷 2020-11-30 08:25

I am trying to use reflection to create instance of a class. But it is sealed internal and has private constructor. I wonder how can i initiaise it and as its part of framew

5条回答
  •  臣服心动
    2020-11-30 09:07

    You can't instantiate classes with private constructors unless it's a nested class.

    http://msdn.microsoft.com/en-us/library/kcfb85a6%28VS.71%29.aspx

提交回复
热议问题