473,796 Members | 2,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set a top-level namespace when you've defined a root namespace?

Hi,

I suspect that this isn't possible, but I figured I'd ask.

My project has a root namespace, let's say it's "Root", that applies to
almost every source file (which is why I've set it as the project's root
namespace).

However, the project also includes a couple of source files whose contents
will live in an entirely different namespace, let's say the "Special"
namespace.

So, within those particular source files, I use the Namespace statement:
Namespace Special

However, this puts the code into the namespace "Root.Speci al", not
"Special".

Does anyone know whether it's possible to use the Namespace statement to put
something into a top level namespace, NOT within the project's root
namespace?

Thanks,
Jeff Brown

Nov 21 '05 #1
2 1973
Jeff,
Does anyone know whether it's possible to use the Namespace statement to
put something into a top level namespace, NOT within the project's root
namespace? No, when you set the project's root namespace it is set for every file!

Have you considered moving the Special namespace into its own project? As it
sounds like it is outside the namespace of the current project.

However most of my solutions, the root of all projects share a common root.

For example, in my "My Application" solution, I might have:

Solution: My Application
Folder: My Application

Project: My App
Folder: My Application\My App
Namespace: MyApp
Assembly: MyApp.exe

Project: Framework
Folder: My Application\Fra mework
Namespace: MyApp.Framework
Assembly: MyApp.Framework .dll
Project: Plugin1
Folder: My Application\Plu gin1
Namespace: MyApp.Plugin1
Assembly: MyApp.Plugin1.d ll
Project: Plugin2
Folder: My Application\Plu gin2
Namespace: MyApp.Plugin2
Assembly: MyApp.Plugin2.d ll
Project: Data
Folder: My Application\Dat a
Namespace: MyApp.Data
Assembly: MyApp.Data.dll
Project: UI
Folder: My Application\UI
Namespace: MyApp.UI
Assembly: MyApp.UI.dll

Hope this helps
Jay
"Jeff Brown" <wo************ **@hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. Hi,

I suspect that this isn't possible, but I figured I'd ask.

My project has a root namespace, let's say it's "Root", that applies to
almost every source file (which is why I've set it as the project's root
namespace).

However, the project also includes a couple of source files whose contents
will live in an entirely different namespace, let's say the "Special"
namespace.

So, within those particular source files, I use the Namespace statement:
Namespace Special

However, this puts the code into the namespace "Root.Speci al", not
"Special".

Does anyone know whether it's possible to use the Namespace statement to
put something into a top level namespace, NOT within the project's root
namespace?

Thanks,
Jeff Brown

Nov 21 '05 #2
Jeff,
Does anyone know whether it's possible to use the Namespace statement to
put something into a top level namespace, NOT within the project's root
namespace? No, when you set the project's root namespace it is set for every file!

Have you considered moving the Special namespace into its own project? As it
sounds like it is outside the namespace of the current project.

However most of my solutions, the root of all projects share a common root.

For example, in my "My Application" solution, I might have:

Solution: My Application
Folder: My Application

Project: My App
Folder: My Application\My App
Namespace: MyApp
Assembly: MyApp.exe

Project: Framework
Folder: My Application\Fra mework
Namespace: MyApp.Framework
Assembly: MyApp.Framework .dll
Project: Plugin1
Folder: My Application\Plu gin1
Namespace: MyApp.Plugin1
Assembly: MyApp.Plugin1.d ll
Project: Plugin2
Folder: My Application\Plu gin2
Namespace: MyApp.Plugin2
Assembly: MyApp.Plugin2.d ll
Project: Data
Folder: My Application\Dat a
Namespace: MyApp.Data
Assembly: MyApp.Data.dll
Project: UI
Folder: My Application\UI
Namespace: MyApp.UI
Assembly: MyApp.UI.dll

Hope this helps
Jay
"Jeff Brown" <wo************ **@hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. Hi,

I suspect that this isn't possible, but I figured I'd ask.

My project has a root namespace, let's say it's "Root", that applies to
almost every source file (which is why I've set it as the project's root
namespace).

However, the project also includes a couple of source files whose contents
will live in an entirely different namespace, let's say the "Special"
namespace.

So, within those particular source files, I use the Namespace statement:
Namespace Special

However, this puts the code into the namespace "Root.Speci al", not
"Special".

Does anyone know whether it's possible to use the Namespace statement to
put something into a top level namespace, NOT within the project's root
namespace?

Thanks,
Jeff Brown

Nov 21 '05 #3

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

Similar topics

2
3746
by: Marcus Otmarsen | last post by:
Ok, the situation is as follows: I defined a <DIV> like: <div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div> This pane is used to move an object around on the web page by a javascript. As long as I define no further <div> pane everything works fine.
26
45527
by: Dave Hammond | last post by:
In document "A.html" I have defined a function and within the document body have included an IFRAME element who's source is document "B.html". In document "B.html" I am trying to call the function defined in "A.html", but every attempt results in an "is not a function" error. I have tried to invoke the function using parent.document.funcname(), top.document.funcname(), and various other identifying methods, but all result in the above...
3
43596
by: someone | last post by:
Here is my code: TreeNodeCollection nodes = tvwFolders.Nodes; if (nodes.Count > 0) { // Select the root node tvwFolders.SelectedNode = nodes; } I hope there is an easier way. I looked at TreeView.TopNode, but that is the top "visible" node. I would think that getting the absolute top node should
3
3682
by: Arthur Dent | last post by:
Hello all... Im seeing something strange. I have a repeater control which has a footertemplate. The content in the footertemplate however is showing up at the TOP of the repeater contents. Shouldn't a footer be at the BOTTOM? I thought maybe it was because i did not have a headertemplate defined, so i added one of those, but that didnt help either.
1
1628
by: Paul Ertz | last post by:
Hello, We would like to hide the left column for the main/home page of our plone sites dynamically using a tal: expression. I figured out that I need to customize the main_template file something like this: <td id="portal-column-one" metal:define-slot="column_one_slot" tal:define="sectionlevel " tal:condition="<if home/main page of plone site hide this column>">
32
5006
by: priyam.trivedi | last post by:
Hi! Could anyone tell me how to find the square root of a number without using the sqrt function. I did it by using Newton's Formula. How can it be done by using the Binomial Theorem/Taylor Series? Is there any other way of doing it rather than using series? Thank you, Priyam
0
2497
by: jklBruin | last post by:
i'm trying to implement converting xsl-fo to pdf on a .Net page. i''m getting the error message: Root element must be root, not http://www.w3.org/1999/XSL/Transform:stylesheet here's the xsl i'm using. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet
10
2977
by: iwl | last post by:
Hi, I tryed askstring to input some text in my script, but some ugly empty Window appears with the Input-Window behind and all together behind my Console showing my script. So all have to brought to the top first by the user - very unconfortable
1
1540
by: sheldonlg | last post by:
I define a div, excItem, with absolute positioning and with a top of 400px. I then call a javascript function which does toggling of visibility and should do positioning as well. I loop though the parents with offsetTop to get the position of the clicking element, which here is set in "y". Here is the code snippet: excItem.style.top = y + 20; alert('y=' + y + ' top=' + excItem.style.top);
13
1770
Death Slaught
by: Death Slaught | last post by:
As usual everything looks great in Opera and FF. I test my page in IE, and hell is unleashed. A giant space on the right side of the screen appears and this is shoving my anchors all the way with it. Everything else stays within the wrapper division and doesn't even move a pixel. ~XHTML~ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd"> <html...
0
9684
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
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10236
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
10017
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
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
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
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
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

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.