I'm trying to use Activator.CreateInstance
to create an instance from a type that has an internal constructor, but it doesn't work,
How can I create an instance of an internal class in Silverlight?
开发者_如何学编程I can get the ConstructorInfo
, but I can't invoke it!!!
Does Silverlight support this?
Well, in Silverlight we can't use Activator.CreateInstance
to create an instance from an internal class.
We should use Type.InvokeMember
and use the BindingFlags.CreateInstance
...
精彩评论