Click here to Skip to main content
15,891,907 members
Home / Discussions / C#
   

C#

 
GeneralRe: Class inside namespace Pin
RSArockiam1-May-07 2:32
RSArockiam1-May-07 2:32 
QuestionConvert a list element Pin
Anka_Ame1-May-07 0:36
Anka_Ame1-May-07 0:36 
AnswerRe: Convert a list element Pin
Pete O'Hanlon1-May-07 1:11
mvePete O'Hanlon1-May-07 1:11 
QuestionRe: Convert a list element Pin
DavidNohejl1-May-07 4:25
DavidNohejl1-May-07 4:25 
AnswerRe: Convert a list element Pin
Pete O'Hanlon1-May-07 5:17
mvePete O'Hanlon1-May-07 5:17 
GeneralRe: Convert a list element Pin
DavidNohejl1-May-07 8:14
DavidNohejl1-May-07 8:14 
GeneralRe: Convert a list element Pin
PIEBALDconsult3-May-07 9:02
mvePIEBALDconsult3-May-07 9:02 
QuestionReflection: How to locate/load a specific NameSpace inside an Assembly? Pin
Dominic Pettifer1-May-07 0:34
Dominic Pettifer1-May-07 0:34 
Hi,

I'm trying to find all classes that implement a specific abstract base class inside an Assembly, so far I have got the following...

Assembly assm = Assembly.GetExecutingAssembly();<br />
<br />
foreach (Type type in assm.GetTypes())<br />
{<br />
   if (type.IsSubclassOf(typeof(MyAbstractClass)))<br />
   {<br />
      Response.Write(type.ToString() + "<br />");<br />
   }<br />
}


...and this seems to work OK. However, my assembly is already fairly large and may grow, and as far as I can tell this code iterates through all types in the assembly, which I feel is inefficient.

I know all my derived classes will sit inside the same namespace, so was wondering if there's a way to iterate through all types inside a particular namespace only, instead of the entire assembly?

Cheers!

Dominic Pettifer

Blog: www.dominicpettifer.co.uk

QuestionC#, Interfaces and Interop Pin
Rhys Gravell1-May-07 0:13
professionalRhys Gravell1-May-07 0:13 
Questiondistinct values in dataset Pin
arkiboys30-Apr-07 23:30
arkiboys30-Apr-07 23:30 
AnswerRe: distinct values in dataset Pin
_mubashir1-May-07 0:12
_mubashir1-May-07 0:12 
QuestionCheck Windows username and password using C#.Net 2003 Pin
Dotnetkanna30-Apr-07 21:30
Dotnetkanna30-Apr-07 21:30 
AnswerRe: Check Windows username and password using C#.Net 2003 Pin
Christian Graus30-Apr-07 22:25
protectorChristian Graus30-Apr-07 22:25 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Colin Angus Mackay30-Apr-07 22:30
Colin Angus Mackay30-Apr-07 22:30 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Dotnetkanna30-Apr-07 23:40
Dotnetkanna30-Apr-07 23:40 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Dotnetkanna30-Apr-07 23:39
Dotnetkanna30-Apr-07 23:39 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Christian Graus30-Apr-07 23:59
protectorChristian Graus30-Apr-07 23:59 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Dotnetkanna1-May-07 0:17
Dotnetkanna1-May-07 0:17 
AnswerRe: Check Windows username and password using C#.Net 2003 Pin
MrEyes1-May-07 2:37
MrEyes1-May-07 2:37 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
Dotnetkanna1-May-07 19:41
Dotnetkanna1-May-07 19:41 
GeneralRe: Check Windows username and password using C#.Net 2003 Pin
MrEyes1-May-07 22:40
MrEyes1-May-07 22:40 
QuestionHow can I use Formula in crystal Report 9 ? Pin
mahmoud wafy30-Apr-07 21:28
mahmoud wafy30-Apr-07 21:28 
Questionunrecognized zeros in C# string format Pin
zoroyster30-Apr-07 20:32
zoroyster30-Apr-07 20:32 
AnswerRe: unrecognized zeros in C# string format Pin
Christian Graus30-Apr-07 21:00
protectorChristian Graus30-Apr-07 21:00 
QuestionC# and C++ class in dll Pin
Levnsn30-Apr-07 19:57
Levnsn30-Apr-07 19:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.