473,396 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

inherited namespace

hello,
is it possible to completly inherit a namespace?

something like
"MyNewNamespace : MyNameSpaceBase"
i want to access all classes in the MyNameSpaceBase by the namespace
"MyNewNamespace", because some classes are inherited and overridden, and
some are not.

thanks for help,

alex

Jan 31 '07 #1
1 1217
Personally I'd just be doing:

using MyNameSpaceBase;
using MyNewNamespace;

As for the question: not as such; you can (on a file by file basis)
alias the namespace, e.g.
using Fred = System.Collections;

then

Fred.BitArary etc - but this is usually used to resolve conflicts in
individual classes, e.g.

using System.Collections;
using Fred.Collections;
using StandardArrayList = System.Collections.ArrayList;
using SuperArrayList = Fred.Collections.ArrayList;

(i.e. an "ArrayList" class exists in 2 namespaces that we are
importing, and we want to be able to use both in shorthand in the same
file - can also handle explicit assembly versioning, but that is more
complex).

Marc

Feb 1 '07 #2

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

Similar topics

3
by: Uty | last post by:
(Originally posted this in VC++ section .. whoops I'm working on a series of projects which have a few things in common, which has been abstracted into an object we'll call ParentForm. I started...
2
by: PIEBALD | last post by:
OK, here's my latest workaround for the lack of inherited constructors... It requires that the class have a parameterless (default) constructor and a public virtual "Initialize" method (which...
2
by: Lauchlan M | last post by:
Hi. Following the example at http://www.codeproject.com/useritems/ooaspnet.asp?print=true, I have a datagrid descendant class that shows a JavaScript confirm dialog before deleting a row from...
12
by: Michael Maes | last post by:
Hello, I have a BaseClass and many Classes which all inherit (directly) from the BaseClass. One of the functions in the BaseClass is to (de)serialize the (inherited) Class to/from disk. ...
3
by: Paul Michaud | last post by:
Consider the following: Class A { .... } Class B:A { ....
0
by: cnSoftware | last post by:
I come across this problem during my recent project and even now I am still be puzzled by it. So I paste the procedure here. I wish you can figure out where I am wrong or missing. The sample...
0
by: Tony Johansson | last post by:
Hello! I have a very specific question and that is about how to inherit a visual control for example the control System.Windows.Forms.TextBox without causing the environment to delete the...
12
by: Mike - EMAIL IGNORED | last post by:
Within class MyClass, I can think of two ways to tell if MyClass is inherited in a particular use: 1. pass an appropriate bool in the ctor args; 2. use a virtual method that returns, for...
5
by: Shak | last post by:
Hi all. I was led to believe that static methods were not inherited by their subclasses (and since that makes sense, rightly so). However, a subclass I've written is using it's (abstract)...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.