473,624 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Namespaces - broad question

I'm confused about the proper use and usefulness of namespaces. I beleive I
understand the purpose is so the developer can put classes within namespaces
to essentially organize your code. And I understand that you declare your
intention to use a namespace within a page through the "Inherits" attribute.
I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace
in code. I know that namespaces have to appear in the project assembly,
however...

How does the assembly find a namespace that the developer has written????
In all the examples I've seen, namespaces have been written in codebehind
pages. How does this make them accessible to the entire project? What's to
prevent a duplicate namespace from being written in a different codebehind
page? Is there a better place to write all the project namespaces for more
centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random
Nov 18 '05 #1
22 1158
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not
understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I understand that you declare your
intention to use a namespace within a page through the "Inherits" attribute. I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace
in code. I know that namespaces have to appear in the project assembly,
however...

How does the assembly find a namespace that the developer has written????
In all the examples I've seen, namespaces have been written in codebehind
pages. How does this make them accessible to the entire project? What's to prevent a duplicate namespace from being written in a different codebehind
page? Is there a better place to write all the project namespaces for more centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random

Nov 18 '05 #2
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not
understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I understand that you declare your
intention to use a namespace within a page through the "Inherits" attribute. I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace
in code. I know that namespaces have to appear in the project assembly,
however...

How does the assembly find a namespace that the developer has written????
In all the examples I've seen, namespaces have been written in codebehind
pages. How does this make them accessible to the entire project? What's to prevent a duplicate namespace from being written in a different codebehind
page? Is there a better place to write all the project namespaces for more centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random

Nov 18 '05 #3
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t.
Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb" AutoEventWireup ="false"
Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes
it's way into the assembly. And because it does, somehow, does that make it
available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the files in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not
understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I beleive
I
understand the purpose is so the developer can put classes within namespaces
to essentially organize your code. And I understand that you declare

your intention to use a namespace within a page through the "Inherits"

attribute.
I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace in code. I know that namespaces have to appear in the project assembly,
however...

How does the assembly find a namespace that the developer has written???? In all the examples I've seen, namespaces have been written in codebehind pages. How does this make them accessible to the entire project? What's to
prevent a duplicate namespace from being written in a different

codebehind page? Is there a better place to write all the project namespaces for

more
centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random


Nov 18 '05 #4
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t.
Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb" AutoEventWireup ="false"
Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes
it's way into the assembly. And because it does, somehow, does that make it
available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the files in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not
understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I beleive
I
understand the purpose is so the developer can put classes within namespaces
to essentially organize your code. And I understand that you declare

your intention to use a namespace within a page through the "Inherits"

attribute.
I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace in code. I know that namespaces have to appear in the project assembly,
however...

How does the assembly find a namespace that the developer has written???? In all the examples I've seen, namespaces have been written in codebehind pages. How does this make them accessible to the entire project? What's to
prevent a duplicate namespace from being written in a different

codebehind page? Is there a better place to write all the project namespaces for

more
centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random


Nov 18 '05 #5
This inherits attribute, refers to the name of the class this page inherits
from. The class's name is CDefault, but it is located in the
ASPNET.StarterK it.Portal namespace, and so the namespace has to preceed it.

At runtime, asp.net looks for a class with the name in the inherits
attribute.

This has nothing to do with projects, or namespaces being available. It is
just the fully qualified name of the class.

"Random" <ci*******@hotm ail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t. Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb" AutoEventWireup ="false" Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes
it's way into the assembly. And because it does, somehow, does that make it available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the

files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I

beleive
I
understand the purpose is so the developer can put classes within

namespaces
to essentially organize your code. And I understand that you declare

your intention to use a namespace within a page through the "Inherits"

attribute.
I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace in code. I know that namespaces have to appear in the project assembly, however...

How does the assembly find a namespace that the developer has written???? In all the examples I've seen, namespaces have been written in codebehind pages. How does this make them accessible to the entire project? What's
to
prevent a duplicate namespace from being written in a different

codebehind page? Is there a better place to write all the project namespaces for

more
centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random



Nov 18 '05 #6
This inherits attribute, refers to the name of the class this page inherits
from. The class's name is CDefault, but it is located in the
ASPNET.StarterK it.Portal namespace, and so the namespace has to preceed it.

At runtime, asp.net looks for a class with the name in the inherits
attribute.

This has nothing to do with projects, or namespaces being available. It is
just the fully qualified name of the class.

"Random" <ci*******@hotm ail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t. Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb" AutoEventWireup ="false" Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes
it's way into the assembly. And because it does, somehow, does that make it available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as not
have to write out the full namespace for every class, not the 'Inherits'
attribute.

Think of namespaces as folders in your file system, and classes as the

files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files.
Classes are the actual things that you instantiate, and call methods on.

I didn't really understand your questions. I think they all stem from not understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
I'm confused about the proper use and usefulness of namespaces. I

beleive
I
understand the purpose is so the developer can put classes within

namespaces
to essentially organize your code. And I understand that you declare

your intention to use a namespace within a page through the "Inherits"

attribute.
I know that using "Inherits" isn't absolutely necessary, it's just
recommended so the developer doesn't have to type out the entire namespace in code. I know that namespaces have to appear in the project assembly, however...

How does the assembly find a namespace that the developer has written???? In all the examples I've seen, namespaces have been written in codebehind pages. How does this make them accessible to the entire project? What's
to
prevent a duplicate namespace from being written in a different

codebehind page? Is there a better place to write all the project namespaces for

more
centralized accessibility?

And finally, how do namespaces DIFFER from classes?

Random



Nov 18 '05 #7
Okay, that clarifies the "Inherits" vs. "Imports" question very well.
Thanks.

As far as the namespace being available in the assembly, though, let me give
you an example...

Using the portal code I gave before, would I be able to write another aspx
page, use the same "Inherits=<full y qualified class name>" phrasing, without
that class being written into the different codebehind page referenced in
the new aspx page?

If yes, why? Shouldn't namespaces be written in a more centrally referenced
file?

If no, then how can the assembly keep track of all the declared namespaces?
And what would it do if two or more codebehind references had the same
namespace and class written in them?

Random

"Marina" <so*****@nospam .com> wrote in message
news:eq******** ******@TK2MSFTN GP10.phx.gbl...
This inherits attribute, refers to the name of the class this page inherits from. The class's name is CDefault, but it is located in the
ASPNET.StarterK it.Portal namespace, and so the namespace has to preceed it.
At runtime, asp.net looks for a class with the name in the inherits
attribute.

This has nothing to do with projects, or namespaces being available. It is
just the fully qualified name of the class.

"Random" <ci*******@hotm ail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t.
Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb"

AutoEventWireup ="false"
Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes it's way into the assembly. And because it does, somehow, does that make it
available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as

not have to write out the full namespace for every class, not the 'Inherits' attribute.

Think of namespaces as folders in your file system, and classes as the

files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files. Classes are the actual things that you instantiate, and call methods on.
I didn't really understand your questions. I think they all stem from not understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
> I'm confused about the proper use and usefulness of namespaces. I

beleive
I
> understand the purpose is so the developer can put classes within
namespaces
> to essentially organize your code. And I understand that you declare your
> intention to use a namespace within a page through the "Inherits"
attribute.
> I know that using "Inherits" isn't absolutely necessary, it's just
> recommended so the developer doesn't have to type out the entire

namespace
> in code. I know that namespaces have to appear in the project assembly, > however...
>
> How does the assembly find a namespace that the developer has

written????
> In all the examples I've seen, namespaces have been written in

codebehind
> pages. How does this make them accessible to the entire project?

What's
to
> prevent a duplicate namespace from being written in a different

codebehind
> page? Is there a better place to write all the project namespaces

for more
> centralized accessibility?
>
> And finally, how do namespaces DIFFER from classes?
>
> Random
>
>



Nov 18 '05 #8
Okay, that clarifies the "Inherits" vs. "Imports" question very well.
Thanks.

As far as the namespace being available in the assembly, though, let me give
you an example...

Using the portal code I gave before, would I be able to write another aspx
page, use the same "Inherits=<full y qualified class name>" phrasing, without
that class being written into the different codebehind page referenced in
the new aspx page?

If yes, why? Shouldn't namespaces be written in a more centrally referenced
file?

If no, then how can the assembly keep track of all the declared namespaces?
And what would it do if two or more codebehind references had the same
namespace and class written in them?

Random

"Marina" <so*****@nospam .com> wrote in message
news:eq******** ******@TK2MSFTN GP10.phx.gbl...
This inherits attribute, refers to the name of the class this page inherits from. The class's name is CDefault, but it is located in the
ASPNET.StarterK it.Portal namespace, and so the namespace has to preceed it.
At runtime, asp.net looks for a class with the name in the inherits
attribute.

This has nothing to do with projects, or namespaces being available. It is
just the fully qualified name of the class.

"Random" <ci*******@hotm ail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
Hmm. I'm trying to teach myself from examples and tutorials and books.
Specifically in this case, I'm trying to learn from the MS PortalStarterKi t.
Specifically, the default page in that example has as the first line in
default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb"

AutoEventWireup ="false"
Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's
more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes it's way into the assembly. And because it does, somehow, does that make it
available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
First of all, namespaces can be used with the 'Imports' keyword, so as

not have to write out the full namespace for every class, not the 'Inherits' attribute.

Think of namespaces as folders in your file system, and classes as the

files
in them. So a namespace itself isn't anything but an organizational
container for classes - just as a folder is just a container for files. Classes are the actual things that you instantiate, and call methods on.
I didn't really understand your questions. I think they all stem from not understanding what a namespace actually is.

"Random" <ci*******@hotm ail.com> wrote in message
news:uD******** ******@TK2MSFTN GP10.phx.gbl...
> I'm confused about the proper use and usefulness of namespaces. I

beleive
I
> understand the purpose is so the developer can put classes within
namespaces
> to essentially organize your code. And I understand that you declare your
> intention to use a namespace within a page through the "Inherits"
attribute.
> I know that using "Inherits" isn't absolutely necessary, it's just
> recommended so the developer doesn't have to type out the entire

namespace
> in code. I know that namespaces have to appear in the project assembly, > however...
>
> How does the assembly find a namespace that the developer has

written????
> In all the examples I've seen, namespaces have been written in

codebehind
> pages. How does this make them accessible to the entire project?

What's
to
> prevent a duplicate namespace from being written in a different

codebehind
> page? Is there a better place to write all the project namespaces

for more
> centralized accessibility?
>
> And finally, how do namespaces DIFFER from classes?
>
> Random
>
>



Nov 18 '05 #9
I have no idea what you are talking about to be honest.

The class is already in a namespace - the Inherits attribute is just
referencing. It isn't creating a new namespace or a new class. So I have no
idea what you are talking about when you ask about namespaces being written
in central locations.

You can have any number of pages inherit from the same class - as long as
that class actually exists. In the visual studio model, you would have to
manually do that, because it assume a 1 to 1 ration between pages and code
behind classes.

If you tried to compiled two classes with the same name into the same
assembly, the compiler would not allow you to do this. The assembly itself
knows what classes it has, and what namespace each one is in, in it's
manifest.

I would recommend you start at the very basics of ASP.NET, it sounds like
you are missing some basic concept about how this all works. In your first
post you asked about the difference between a namespace and a class - so it
seems like you need to go to the beginning of .NET, and not just into the
middle of ASP.NET.

"Random" <ci*******@hotm ail.com> wrote in message
news:ua******** ******@TK2MSFTN GP09.phx.gbl...
Okay, that clarifies the "Inherits" vs. "Imports" question very well.
Thanks.

As far as the namespace being available in the assembly, though, let me give you an example...

Using the portal code I gave before, would I be able to write another aspx
page, use the same "Inherits=<full y qualified class name>" phrasing, without that class being written into the different codebehind page referenced in
the new aspx page?

If yes, why? Shouldn't namespaces be written in a more centrally referenced file?

If no, then how can the assembly keep track of all the declared namespaces? And what would it do if two or more codebehind references had the same
namespace and class written in them?

Random

"Marina" <so*****@nospam .com> wrote in message
news:eq******** ******@TK2MSFTN GP10.phx.gbl...
This inherits attribute, refers to the name of the class this page

inherits
from. The class's name is CDefault, but it is located in the
ASPNET.StarterK it.Portal namespace, and so the namespace has to preceed

it.

At runtime, asp.net looks for a class with the name in the inherits
attribute.

This has nothing to do with projects, or namespaces being available. It is
just the fully qualified name of the class.

"Random" <ci*******@hotm ail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
Hmm. I'm trying to teach myself from examples and tutorials and books. Specifically in this case, I'm trying to learn from the MS

PortalStarterKi t.
Specifically, the default page in that example has as the first line in default.aspx:

<%@ Page CodeBehind="Def ault.aspx.vb" language="vb"

AutoEventWireup ="false"
Inherits="ASPNE T.StarterKit.Po rtal.CDefault" %>

The codebehind page has:

Namespace ASPNET.StarterK it.Portal
Public Class CDefault
Inherits System.Web.UI.P age
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
<code here>
End Sub
End Class
End Namespace

I'm trying to find out how and why this works the way that it does. It's more complex than the examples given by tutorials and books.

And again, I'm trying to figure out how the namespace declared here makes it's way into the assembly. And because it does, somehow, does that make
it
available through the entire project?

Random

"Marina" <so*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
> First of all, namespaces can be used with the 'Imports' keyword, so as not
> have to write out the full namespace for every class, not the 'Inherits' > attribute.
>
> Think of namespaces as folders in your file system, and classes as
the files
> in them. So a namespace itself isn't anything but an organizational
> container for classes - just as a folder is just a container for

files. > Classes are the actual things that you instantiate, and call methods on. >
> I didn't really understand your questions. I think they all stem
from not
> understanding what a namespace actually is.
>
> "Random" <ci*******@hotm ail.com> wrote in message
> news:uD******** ******@TK2MSFTN GP10.phx.gbl...
> > I'm confused about the proper use and usefulness of namespaces. I
beleive
> I
> > understand the purpose is so the developer can put classes within
> namespaces
> > to essentially organize your code. And I understand that you

declare your
> > intention to use a namespace within a page through the "Inherits"
> attribute.
> > I know that using "Inherits" isn't absolutely necessary, it's just
> > recommended so the developer doesn't have to type out the entire
namespace
> > in code. I know that namespaces have to appear in the project

assembly,
> > however...
> >
> > How does the assembly find a namespace that the developer has
written????
> > In all the examples I've seen, namespaces have been written in
codebehind
> > pages. How does this make them accessible to the entire project?
What's
> to
> > prevent a duplicate namespace from being written in a different
codebehind
> > page? Is there a better place to write all the project namespaces for > more
> > centralized accessibility?
> >
> > And finally, how do namespaces DIFFER from classes?
> >
> > Random
> >
> >
>
>



Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1759
by: Random | last post by:
I'm confused about the proper use and usefulness of namespaces. I beleive I understand the purpose is so the developer can put classes within namespaces to essentially organize your code. And I understand that you declare your intention to use a namespace within a page through the "Inherits" attribute. I know that using "Inherits" isn't absolutely necessary, it's just recommended so the developer doesn't have to type out the entire...
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8625
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.