Hi,
I am using GetType.InvokeMember with the invokeAttr argument of
Reflection.BindingFlags.CreateInstance and both classes are in the same VB
2008 project.
It works fine if I change the New() to Public but not whilst it is friend
Thank you
Rob
"Bill McCarthy" <Bi**@NOSPAM.comwrote in message
news:C2**********************************@microsof t.com...
hi Rob,
Might help if you show the code you are using. If the type is in the same
assembly, then Activator.CreateInstance(GetType(foo), true) will work
"Rob Blackmore" <ro*@robblackmore.comwrote in message
news:eZ**************@TK2MSFTNGP02.phx.gbl...
>>I mean calling a Friend constructor from another class within the same
project via reflection. Apologies for any confusion with the original
post.
>>Hi,
Can anyone advise how to call a private constructor using reflection? I
currently get the above error which is rectified by changing the New()
to Public from Friend but I ideally wish to leave it as Friend to
prevent it being created outside of this project.
Thanks in advance
Rob