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

C#

 
AnswerRe: how to find page controls Pin
Colin Angus Mackay31-Jul-07 3:26
Colin Angus Mackay31-Jul-07 3:26 
GeneralRe: how to find page controls Pin
Farhan Ali31-Jul-07 3:51
Farhan Ali31-Jul-07 3:51 
AnswerRe: how to find page controls Pin
Sandeep Akhare31-Jul-07 4:52
Sandeep Akhare31-Jul-07 4:52 
AnswerRe: how to find page controls Pin
Malcolm Smart31-Jul-07 5:05
Malcolm Smart31-Jul-07 5:05 
QuestionCapturing Mouse Pointer? Pin
Janu_M31-Jul-07 2:10
Janu_M31-Jul-07 2:10 
AnswerRe: Capturing Mouse Pointer? Pin
snorkie31-Jul-07 3:34
professionalsnorkie31-Jul-07 3:34 
GeneralThanks you very much. Pin
Janu_M31-Jul-07 19:40
Janu_M31-Jul-07 19:40 
QuestionopenGL Pin
Noharyiasa31-Jul-07 1:58
Noharyiasa31-Jul-07 1:58 
AnswerRe: openGL Pin
led mike31-Jul-07 4:33
led mike31-Jul-07 4:33 
QuestionGetting the value of a column of selected row in DataGridView Pin
VijayaRam31-Jul-07 1:36
VijayaRam31-Jul-07 1:36 
AnswerRe: Getting the value of a column of selected row in DataGridView Pin
Herman<T>.Instance31-Jul-07 2:53
Herman<T>.Instance31-Jul-07 2:53 
AnswerRe: Getting the value of a column of selected row in DataGridView Pin
il_masacratore31-Jul-07 2:57
il_masacratore31-Jul-07 2:57 
QuestionHTML form filler Pin
Bone200331-Jul-07 1:32
Bone200331-Jul-07 1:32 
GeneralRe: HTML form filler Pin
Luka Grabarevic31-Jul-07 3:18
Luka Grabarevic31-Jul-07 3:18 
GeneralRe: HTML form filler Pin
Vasudevan Deepak Kumar31-Jul-07 3:28
Vasudevan Deepak Kumar31-Jul-07 3:28 
GeneralRe: HTML form filler Pin
Luka Grabarevic31-Jul-07 3:46
Luka Grabarevic31-Jul-07 3:46 
GeneralRe: HTML form filler Pin
Bone200331-Jul-07 4:10
Bone200331-Jul-07 4:10 
GeneralRe: HTML form filler Pin
led mike31-Jul-07 4:27
led mike31-Jul-07 4:27 
GeneralRe: HTML form filler Pin
Bone200331-Jul-07 4:33
Bone200331-Jul-07 4:33 
GeneralRe: HTML form filler Pin
J4amieC31-Jul-07 5:07
J4amieC31-Jul-07 5:07 
GeneralRe: HTML form filler Pin
Bone200331-Jul-07 21:17
Bone200331-Jul-07 21:17 
QuestionUsing directive Pin
Albu Marius31-Jul-07 1:28
Albu Marius31-Jul-07 1:28 
AnswerRe: Using directive Pin
Luc Pattyn31-Jul-07 1:34
sitebuilderLuc Pattyn31-Jul-07 1:34 
GeneralRe: Using directive Pin
Albu Marius31-Jul-07 1:47
Albu Marius31-Jul-07 1:47 
GeneralRe: Using directive Pin
Luc Pattyn31-Jul-07 2:02
sitebuilderLuc Pattyn31-Jul-07 2:02 
Is there a faster way than reflection to find out if the namespace is correct?

Not as far as I know. And it would be expensive: you would have to create
a separate AppDomain I guess, then try to list all DLL candidates, load them
(either all at once, exhausting memory, or one at the time; removing it is
only possible by unloading the AppDomain).

Warning: even the Dictionary approach is just an approximation; if there
were only one Timer (say Timers.Timer) and you added it to the dictionary,
now the next .NET release adds a second Timer (say Threading.Timer), your dictionary
would not know it, and enforce one kind of Timer, whereas the user might want
another one.

So my guess is:
1) you should not even try to do the massive reflection at run-time (you might
do it once to generate a dictionary)
2) I would generate a very small dictionary manually; it suffices to recognize
a couple of the most popular classes for each DLL (e.g. File, FileStream,
FileInfo, Directory is all I would recognize to include System.IO), there is
no need to have an exhaustive list
3) whatever you do, it will only be an attempt, good enough to provide
an initial source file, not good enough for generating a ready-made and
error-free source file.

BTW: Actually, when I said Dictionary, that is not strictly correct, since
classnames are not unique (Timer example again).


Smile | :)




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.