K
Kelmen Wong
Greeting,
I'm working on a class managing resources (satelite).
public CResMgr()
{
Assembly objClient = Assembly.GetCallingAssembly();
_objResMgr = new ResourceManager(objClient.GetType().Namespace + '.'
+ DefaultBaseName, objClient);
The result of objClient.GetType().Namespace is "System.Reflection",
not what I'm expecting.
Presently, I workaround by passing the caller's Type.
_objResMgr = new CResMgr(this.GetType());
public CResMgr(Type objCaller)
{
_objResMgr = new ResourceManager(objCaller.Namespace + '.' +
DefaultBaseName, objCaller.Assembly);
Is there a way to dynamically to retrieve the Namespace of the
calling obj?
I'm working on a class managing resources (satelite).
public CResMgr()
{
Assembly objClient = Assembly.GetCallingAssembly();
_objResMgr = new ResourceManager(objClient.GetType().Namespace + '.'
+ DefaultBaseName, objClient);
The result of objClient.GetType().Namespace is "System.Reflection",
not what I'm expecting.
Presently, I workaround by passing the caller's Type.
_objResMgr = new CResMgr(this.GetType());
public CResMgr(Type objCaller)
{
_objResMgr = new ResourceManager(objCaller.Namespace + '.' +
DefaultBaseName, objCaller.Assembly);
Is there a way to dynamically to retrieve the Namespace of the
calling obj?