Namespaces in a dll file

T

tshad

If I create multiple .dll files with the same namespace, but different
classes. Is this the same thing as creating one file with one Namespace and
all the classes in that namespace?

If so, is it better to create multiple files or just one big file?

Also, what causes ASP to look at each .dll file in the Bin folder. Even
when I make changes, they seem to get picked up.

How does ASP know to load the new .dll or the same .dll again if a change is
made?

Thanks,

Tom.
 
B

bruce barker

namespaces really have nothing to do with dlls. serveral dll can use the
same namespace, or a dll can contain multiple namespaces. even a single file
can contain multiple namesspaces. namespaces are used to make object names
unique (name scope). when you add an import statement to a class file, the
compiler nicely lokks under every namespace to find an object of a given
name.

when asp compile your pages, it copies all the dll's in the bin folder to a
shadow directory, where it will compile a page. it keeps a file watcher
request on the bin folder. any file change in bin, forces a recompile of all
the pages. the compiler actually seaches the shadow bin folder for dll as it
needs them for name reference. it just opens every dll, and uses reflection
to get all the class and method names.

how many dll's you have is strictly a code management issue. there is a
performance disadvantage to having lots of dll's as it effects loading time.

-- bruce (sqlwork.com)

| If I create multiple .dll files with the same namespace, but different
| classes. Is this the same thing as creating one file with one Namespace
and
| all the classes in that namespace?
|
| If so, is it better to create multiple files or just one big file?
|
| Also, what causes ASP to look at each .dll file in the Bin folder. Even
| when I make changes, they seem to get picked up.
|
| How does ASP know to load the new .dll or the same .dll again if a change
is
| made?
|
| Thanks,
|
| Tom.
|
|
 
T

tshad

bruce barker said:
namespaces really have nothing to do with dlls. serveral dll can use the
same namespace, or a dll can contain multiple namespaces. even a single
file
can contain multiple namesspaces. namespaces are used to make object names
unique (name scope). when you add an import statement to a class file, the
compiler nicely lokks under every namespace to find an object of a given
name.

when asp compile your pages, it copies all the dll's in the bin folder to
a
shadow directory, where it will compile a page. it keeps a file watcher
request on the bin folder. any file change in bin, forces a recompile of
all
the pages. the compiler actually seaches the shadow bin folder for dll as
it
needs them for name reference. it just opens every dll, and uses
reflection
to get all the class and method names.

how many dll's you have is strictly a code management issue. there is a
performance disadvantage to having lots of dll's as it effects loading
time.

So it is better to use just one .dll for my namespaces then (even though I
don't have to).

Thanks,

Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top