473,385 Members | 1,531 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,385 software developers and data experts.

NameSpaces How To

I have two libraries projects, a Vb one and an Cs one

I tried to have them both use the same namespace name and had problems.
Rather then describe everything I tried let me ask if that is valid?

If it is, then suppose I have two classes VbClass and CsClass.
One in one project and one in the other.

How does VbClass reference a method in CsClass

Thanks in advance
Nov 20 '05 #1
5 782
* " SamSpade" <st**************@REMOVEaol.com> scripsit:
I tried to have them both use the same namespace name and had problems.
Rather then describe everything I tried let me ask if that is valid?

If it is, then suppose I have two classes VbClass and CsClass.
One in one project and one in the other.

How does VbClass reference a method in CsClass


For example, by referencing the library, the 'CsClass' resides in, then
importing the namespace 'CsClass' is defined in and instantiating the
class.

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Nov 20 '05 #2
In your answer is there an implicit "yes" concerning the one namespace for
two projects?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c2*************@ID-208219.news.uni-berlin.de...
* " SamSpade" <st**************@REMOVEaol.com> scripsit:
I tried to have them both use the same namespace name and had problems.
Rather then describe everything I tried let me ask if that is valid?

If it is, then suppose I have two classes VbClass and CsClass.
One in one project and one in the other.

How does VbClass reference a method in CsClass


For example, by referencing the library, the 'CsClass' resides in, then
importing the namespace 'CsClass' is defined in and instantiating the
class.

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

Nov 20 '05 #3
> In your answer is there an implicit "yes" concerning the one namespace for
two projects?

Yes thats exactly what he's saying. Try it and see.

Richard
Nov 20 '05 #4
Thanks
I had tried it before my first post but had a problem. The libraries are
complex so now that I know it should work I'll comment much of them out, get
it working and then put things back a little at a time.

One is Cs and one is Vb, hope that doesn't matter.
One uses something in the other - hope that's OK too.

"Richard" <go****@intermension.com> wrote in message
news:ee**************************@posting.google.c om...
In your answer is there an implicit "yes" concerning the one namespace for two projects?

Yes thats exactly what he's saying. Try it and see.

Richard

Nov 20 '05 #5
I forgot to mention these are all shared methods.
So I assume I do NOT have to instantiate the class to use a method???
"Richard" <go****@intermension.com> wrote in message
news:ee**************************@posting.google.c om...
In your answer is there an implicit "yes" concerning the one namespace for two projects?

Yes thats exactly what he's saying. Try it and see.

Richard

Nov 20 '05 #6

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

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
24
by: Marcin Vorbrodt | last post by:
Here is an example of my code: //Header file #include <vector> using std::vector; namespace Revelation { // class definitions, etc... // class members are of type std::vector }
2
by: Mike Morse | last post by:
What see sample that show xs:element where the xs namespace = http://www.w3.org/2001/XMLSchema However, I see another example with xsi: where xsi = http://www.w3.org/2001/XMLSchema-instance ...
3
by: Jim Heavey | last post by:
Trying to get the hang of Namespaces. I have primarly developed in VB and am transitioning to C# and the .Net Environment. I have worked a bit with Java as well in school about a year or so ago....
17
by: clintonG | last post by:
Using 2.0 with Master Pages and a GlobalBaseClass for the content pages. I understand the easy part -- the hierarchical structure of a namespace naming convention -- but the 2.0 IDE does not...
11
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.