I would like to query namespaces within an assembly to find a class with a specific name and inheritance. I am sure this knowledge exists somewhere, I just can't seem to find it (the keywords point to too many possibilities). There is just a small amount more information that I need then I can find... if you take my meaning. Not all of the example which follows is accurate, but it is intended to get the message across.
object GetObjectReference( string objectName, System.Type type, [Unknown Type] SCOPE)
{
foreach( [Unknown Type] _NameSpace in SCOPE )
{
object o = GetObjectReference( objectName, type, _NameSpace, Asm );
if( o != null ) return( o );
} foreach( [Unknown Type] _Class in SCOPE ) { /// OVER SIMPLIFIED if( _Class.GetName().ToLower() == objectName.ToLower() ) { object o = _Class.GetConstructor().Construct(); if( typeOf( o ) == type ) return( o );
} }
}
.NET Development11
|