Click here to Skip to main content
15,893,564 members
Home / Discussions / C#
   

C#

 
QuestionUsing html agility pack Pin
Baeltazor10-Dec-09 11:01
Baeltazor10-Dec-09 11:01 
AnswerRe: Using html agility pack Pin
Ravi Bhavnani10-Dec-09 11:20
professionalRavi Bhavnani10-Dec-09 11:20 
QuestionStatic Constructors/Static Initializers Pin
KnyteHawkk10-Dec-09 10:23
KnyteHawkk10-Dec-09 10:23 
AnswerRe: Static Constructors/Static Initializers [modified] Pin
PIEBALDconsult10-Dec-09 10:51
mvePIEBALDconsult10-Dec-09 10:51 
GeneralRe: Static Constructors/Static Initializers Pin
KnyteHawkk10-Dec-09 11:16
KnyteHawkk10-Dec-09 11:16 
GeneralRe: Static Constructors/Static Initializers Pin
PIEBALDconsult10-Dec-09 11:45
mvePIEBALDconsult10-Dec-09 11:45 
GeneralRe: Static Constructors/Static Initializers Pin
KnyteHawkk10-Dec-09 11:46
KnyteHawkk10-Dec-09 11:46 
AnswerRe: Static Constructors/Static Initializers Pin
Ian Shlasko10-Dec-09 11:28
Ian Shlasko10-Dec-09 11:28 
You could always delve into reflection... It's a bit hefty, but would only have to happen once.

Iterate through every class in the assembly, filtering out just those that inherit from the base class. Have protected virtual properties that return everything you have to add to the table. Add 'em all in...

And just call that process the first time you do a getClassBySig (Only if it's not already initialized).

If you prefer, you can store a pointer to the constructor instead of an instance of the object for each entry in the dictionary.

EDIT:

To clarify, you would use System.Reflection.Assembly.GetExecutingAssembly().GetTypes() to fetch all of the available types... For each, check IsSubclassOf(typeof(BaseClass)), then for each type that passes, GetConstructor().

Proud to have finally moved to the A-Ark. Which one are you in?
Author of Guardians of Xen (Sci-Fi/Fantasy novel)

GeneralRe: Static Constructors/Static Initializers Pin
PIEBALDconsult10-Dec-09 11:44
mvePIEBALDconsult10-Dec-09 11:44 
GeneralRe: Static Constructors/Static Initializers Pin
Ian Shlasko10-Dec-09 12:14
Ian Shlasko10-Dec-09 12:14 
GeneralRe: Static Constructors/Static Initializers Pin
PIEBALDconsult10-Dec-09 12:41
mvePIEBALDconsult10-Dec-09 12:41 
AnswerRe: Static Constructors/Static Initializers Pin
PIEBALDconsult11-Dec-09 11:05
mvePIEBALDconsult11-Dec-09 11:05 
Questionzedgraph Pin
jashimu10-Dec-09 7:25
jashimu10-Dec-09 7:25 
AnswerRe: zedgraph Pin
Luc Pattyn10-Dec-09 7:32
sitebuilderLuc Pattyn10-Dec-09 7:32 
GeneralRe: zedgraph Pin
jashimu10-Dec-09 8:27
jashimu10-Dec-09 8:27 
Question<key value=""> collection as a parameter in an interface method</key> Pin
Chiman110-Dec-09 5:51
Chiman110-Dec-09 5:51 
GeneralRe: collection as a parameter in an interface method [modified] Pin
Abhinav S10-Dec-09 6:22
Abhinav S10-Dec-09 6:22 
GeneralRe: collection as a parameter in an interface method Pin
Chiman111-Dec-09 17:34
Chiman111-Dec-09 17:34 
QuestionSend a class object to a webservice Pin
Gktony10-Dec-09 5:32
Gktony10-Dec-09 5:32 
AnswerRe: Send a class object to a webservice Pin
hammerstein0510-Dec-09 5:52
hammerstein0510-Dec-09 5:52 
GeneralRe: Send a class object to a webservice Pin
Gktony10-Dec-09 6:08
Gktony10-Dec-09 6:08 
GeneralRe: Send a class object to a webservice Pin
hammerstein0510-Dec-09 6:30
hammerstein0510-Dec-09 6:30 
Questionvariable names Pin
benjamin yap10-Dec-09 4:59
benjamin yap10-Dec-09 4:59 
AnswerRe: variable names Pin
Keith Barrow10-Dec-09 5:05
professionalKeith Barrow10-Dec-09 5:05 
AnswerRe: variable names Pin
OriginalGriff10-Dec-09 5:05
mveOriginalGriff10-Dec-09 5:05 

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.