Click here to Skip to main content
15,917,808 members
Home / Discussions / C#
   

C#

 
GeneralRe: Movement... sigh Pin
MasterSharp12-Oct-07 7:48
MasterSharp12-Oct-07 7:48 
GeneralRe: Movement... sigh Pin
snorkie29-Oct-07 9:39
professionalsnorkie29-Oct-07 9:39 
AnswerYou can cheat a little Pin
Ennis Ray Lynch, Jr.12-Oct-07 8:41
Ennis Ray Lynch, Jr.12-Oct-07 8:41 
QuestionFinding Classes that implement a certain Class Pin
Fayu12-Oct-07 6:29
Fayu12-Oct-07 6:29 
AnswerRe: Finding Classes that implement a certain Class Pin
Luc Pattyn12-Oct-07 7:07
sitebuilderLuc Pattyn12-Oct-07 7:07 
GeneralRe: Finding Classes that implement a certain Class Pin
Fayu12-Oct-07 7:40
Fayu12-Oct-07 7:40 
GeneralRe: Finding Classes that implement a certain Class Pin
Luc Pattyn12-Oct-07 8:02
sitebuilderLuc Pattyn12-Oct-07 8:02 
AnswerRe: Finding Classes that implement a certain Class Pin
Skippums12-Oct-07 7:10
Skippums12-Oct-07 7:10 
Do the following if baseType is a class...

private List<Type> GetDerivedTypes(List<Type> allPossible, Type baseType) {
if (baseType == typeof(object))
return allPossible;
List<Type> rval = new List<Type>();
foreach (Type t in allPossible) {
Type baseT = t;
while (baseT != typeof(object)) {
if (baseT == baseType) {
rval.Add(t);
break;
}
baseT = baseT.BaseType;
}
}
return rval;
}

Do the following if baseType is an interface...
// Same intro as before
foreach (Type t in allPossible) {
foreach (Type iface in t.GetInterfaces()) {
if (iface == baseInterface) {
rval.Add(t);
break;
}
}
}
return rval;
}

Hope this helps.

Jeff
GeneralRe: Finding Classes that implement a certain Class Pin
Fayu12-Oct-07 7:40
Fayu12-Oct-07 7:40 
AnswerRe: Finding Classes that implement a certain Class Pin
led mike12-Oct-07 7:17
led mike12-Oct-07 7:17 
GeneralRe: Finding Classes that implement a certain Class Pin
Fayu12-Oct-07 7:42
Fayu12-Oct-07 7:42 
GeneralRe: Finding Classes that implement a certain Class Pin
Skippums12-Oct-07 8:02
Skippums12-Oct-07 8:02 
GeneralRe: Finding Classes that implement a certain Class Pin
Fayu12-Oct-07 8:42
Fayu12-Oct-07 8:42 
QuestionUDPClient Recieve port [modified] Pin
Riot_starter12-Oct-07 6:26
Riot_starter12-Oct-07 6:26 
QuestionCasting a WebService instance to a custom interface Pin
MrEyes12-Oct-07 5:47
MrEyes12-Oct-07 5:47 
AnswerRe: Casting a WebService instance to a custom interface Pin
led mike12-Oct-07 6:59
led mike12-Oct-07 6:59 
GeneralRe: Casting a WebService instance to a custom interface Pin
MrEyes12-Oct-07 8:23
MrEyes12-Oct-07 8:23 
GeneralRe: Casting a WebService instance to a custom interface Pin
led mike12-Oct-07 9:54
led mike12-Oct-07 9:54 
QuestionCan't Break point ASP Project Pin
smarttom9912-Oct-07 5:09
smarttom9912-Oct-07 5:09 
AnswerRe: Can't Break point ASP Project Pin
martin_hughes12-Oct-07 5:21
martin_hughes12-Oct-07 5:21 
GeneralRe: Can't Break point ASP Project Pin
smarttom9913-Oct-07 4:29
smarttom9913-Oct-07 4:29 
GeneralRe: Can't Break point ASP Project Pin
martin_hughes13-Oct-07 6:03
martin_hughes13-Oct-07 6:03 
QuestionModal Dialogs Pin
Skippums12-Oct-07 5:05
Skippums12-Oct-07 5:05 
AnswerRe: Modal Dialogs Pin
TJoe12-Oct-07 6:13
TJoe12-Oct-07 6:13 
GeneralRe: Modal Dialogs Pin
Skippums12-Oct-07 6:27
Skippums12-Oct-07 6:27 

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.