P
Peter
Hi,
I have a Class-Tree based on "Command-Pattern"
eg.
public class Calculator
{ ....
}
public abstract class command
{ ..
public abstract void Execute()
{
}
}
public class commandAlpha : command
{ ...
public commandAlpha(Calculator calulator, float alpha)
{
}
}
public class commandGamma : command
{ ...
public commandAlpha(Calculator calulator, float gamma)
{
}
}
public class commandGamma2 : command
{ ...
public commandAlpha(Calculator calulator, float gamma, deviation
float)
{
}
}
.....
Now i will add a Userinterface to test the calculator.
A Combobox should show all Commands, but i will not "hardcode" them to
the combobox. My Ideea is to find all "SubClasses of command" and add
the Type to the Combobox .
1) How can I find all Subclasses of a Class/Type ?
2) How can I find all Subclasses of a Class/Type if there are different
Namspaces/Assemblies ?
Thank you
Peter
I have a Class-Tree based on "Command-Pattern"
eg.
public class Calculator
{ ....
}
public abstract class command
{ ..
public abstract void Execute()
{
}
}
public class commandAlpha : command
{ ...
public commandAlpha(Calculator calulator, float alpha)
{
}
}
public class commandGamma : command
{ ...
public commandAlpha(Calculator calulator, float gamma)
{
}
}
public class commandGamma2 : command
{ ...
public commandAlpha(Calculator calulator, float gamma, deviation
float)
{
}
}
.....
Now i will add a Userinterface to test the calculator.
A Combobox should show all Commands, but i will not "hardcode" them to
the combobox. My Ideea is to find all "SubClasses of command" and add
the Type to the Combobox .
1) How can I find all Subclasses of a Class/Type ?
2) How can I find all Subclasses of a Class/Type if there are different
Namspaces/Assemblies ?
Thank you
Peter