Click here to Skip to main content
15,884,472 members
Home / Discussions / C#
   

C#

 
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 | :)




GeneralRe: Using directive Pin
Albu Marius31-Jul-07 2:07
Albu Marius31-Jul-07 2:07 
GeneralRe: Using directive Pin
Albu Marius31-Jul-07 2:17
Albu Marius31-Jul-07 2:17 
GeneralRe: Using directive Pin
Luc Pattyn31-Jul-07 2:33
sitebuilderLuc Pattyn31-Jul-07 2:33 
GeneralRe: Using directive Pin
Albu Marius31-Jul-07 2:43
Albu Marius31-Jul-07 2:43 
AnswerRe: Using directive Pin
J4amieC31-Jul-07 3:05
J4amieC31-Jul-07 3:05 
AnswerRe: Using directive Pin
PIEBALDconsult31-Jul-07 10:21
mvePIEBALDconsult31-Jul-07 10:21 
GeneralRe: Using directive Pin
Albu Marius31-Jul-07 22:01
Albu Marius31-Jul-07 22:01 
GeneralRe: Using directive Pin
PIEBALDconsult1-Aug-07 13:52
mvePIEBALDconsult1-Aug-07 13:52 
GeneralRe: Using directive Pin
Albu Marius2-Aug-07 1:20
Albu Marius2-Aug-07 1:20 
GeneralRe: Using directive Pin
PIEBALDconsult2-Aug-07 15:12
mvePIEBALDconsult2-Aug-07 15:12 
QuestionDataGridView Pin
sangramkp31-Jul-07 1:26
sangramkp31-Jul-07 1:26 
AnswerRe: DataGridView Pin
Herman<T>.Instance31-Jul-07 2:56
Herman<T>.Instance31-Jul-07 2:56 
QuestionNUnit and relative Paths Pin
User 665831-Jul-07 1:25
User 665831-Jul-07 1:25 
Questionconvertion from word file into pdf file Pin
adilkazmi31-Jul-07 1:14
adilkazmi31-Jul-07 1:14 
AnswerRe: convertion from word file into pdf file Pin
ekynox31-Jul-07 2:36
ekynox31-Jul-07 2:36 
AnswerRe: convertion from word file into pdf file Pin
Not Active31-Jul-07 2:36
mentorNot Active31-Jul-07 2:36 
QuestionStrange behavior of comparison with Double.IsPositiveInfinity [modified] Pin
Stefan Troschuetz31-Jul-07 1:13
Stefan Troschuetz31-Jul-07 1:13 

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.