Activator.CreateInstance
, except for one extreme edge-case, always creates a new instance. I suggest that you probably dont want to use Activator
here.
However, if you have no choice, the hacky hack hack hack is to make a class that inherits from ContextBoundObject
, and decorate it with a custom subclass of ProxyAttribute
. In the custom ProxyAttribute
subclass, override CreateInstance
to do whatever you want. This is all kinds of evil. But it even works with new Foo()
.