473,397 Members | 2,033 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,397 software developers and data experts.

Name Question

I asked this in the .dotnet.general group but got no replies...

If a namespace contains another namespace, and a class with the same names
how can one differentiate them?
Eg

Namespace foo
Class doSomething
........
End Class
Class classOne
........
End Class
Class classTwo
........
End Class
Namespace doSomething
Class anotherClass
...
End Class
Class anotherClassTwo
...
End Class
End Namespace
End Namespace

If one wanted to import foo.doSomething visualstudio automatically loads the
class instead of the namespace.
How would one go about directing it to import the namespace instead of the
class?

ps: I am working with packages that I have no control over.

Thanks
Wole

Nov 21 '05 #1
3 894
"Wole Ogunremi" <wo*************@SPAMntlworld.com> schrieb:
If a namespace contains another namespace, and a class with the same names
how can one differentiate them?
Eg

Namespace foo
Class doSomething
........
End Class
Class classOne
........
End Class
Class classTwo
........
End Class
Namespace doSomething
Class anotherClass
...
End Class
Class anotherClassTwo
...
End Class
End Namespace
End Namespace

If one wanted to import foo.doSomething visualstudio automatically loads
the
class instead of the namespace.
How would one go about directing it to import the namespace instead of the
class?

ps: I am working with packages that I have no control over.


What language was used to develop the package? VB.NET and C# don't compile
the code you showed above because of the name clash. I wonder if any other
..NET programming language allows that. I would strongly recommend to make
the author of the class library aware of this problem.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2
Herfried,

I'm trying to work with SAXON.NET which is java ported to IL and works great
with C#!
They've got a Query class within the net.sf.saxon namespace which also holds
a query namespace...
Of course being that C# is case sensitive the two can co-habit. I just
wondered how I might consume it in VB.NET....

Thanks for you reply.

Wole

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Wole Ogunremi" <wo*************@SPAMntlworld.com> schrieb:
If a namespace contains another namespace, and a class with the same
names
how can one differentiate them?
Eg

Namespace foo
Class doSomething
........
End Class
Class classOne
........
End Class
Class classTwo
........
End Class
Namespace doSomething
Class anotherClass
...
End Class
Class anotherClassTwo
...
End Class
End Namespace
End Namespace

If one wanted to import foo.doSomething visualstudio automatically loads
the
class instead of the namespace.
How would one go about directing it to import the namespace instead of
the
class?

ps: I am working with packages that I have no control over.


What language was used to develop the package? VB.NET and C# don't
compile the code you showed above because of the name clash. I wonder if
any other .NET programming language allows that. I would strongly
recommend to make the author of the class library aware of this problem.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #3
"Wole Ogunremi" <wo*************@SPAMntlworld.com> schrieb:
I'm trying to work with SAXON.NET which is java ported to IL and works
great with C#!
They've got a Query class within the net.sf.saxon namespace which also
holds a query namespace...
Of course being that C# is case sensitive the two can co-habit. I just
wondered how I might consume it in VB.NET....


Isn't it possible to fully qualify the class name with its namespace if you
want to use the class in your code?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

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

Similar topics

4
by: Sibyl | last post by:
Is there any way to get the name of a class without an instance (i.e., object of the class)? I am working with log4j, and would like a uniform way to name loggers without typing in the name of the...
7
by: Jim Adamson | last post by:
I have created a web page that receives names and values from a URL string of another page e.g. http://hostname/resolve?sublibrary=JMLibrary&collection=Elton&shelfmark=LM 36TY ... and decodes the...
16
by: Vadim Biktashev | last post by:
Hello all I would like to give a certain name to a certain global variable. Unfortunately, this name is already used in math.h for a mathematical function. Worse, I do need to use maths library...
5
by: Gopal Krish | last post by:
Hello, Can anyone tell me how to strong name a web page? Thanks Gopal
6
by: ashok.dhananjeyan | last post by:
Hi, Actually , I wrote one javascript to retrieve the name of the form in one particular page. what i did in this page is, <script> function checkbutton() {
17
by: vish | last post by:
Hi all, I know this might look strange at first look, but i am looping thru a dataset created using to different tables from database.These two tables have some fields with the same names. ...
2
by: developer.new | last post by:
Hi I have a question regarding this concept I learned about recently: Name Hiding. Here's what I've come across: There is a base class with two functions with the same name but different...
13
by: Rainy | last post by:
I have a stylistic question. In most languages words in var. name are separated by underscores or cap letters, resulting in var names like var_name, VarName and varName. I don't like that very much...
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
10
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.