473,385 Members | 2,162 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.

Namespace Question ...

Hello -

I have a set of utilities that are structured as follows ...

Namespace Utility
Public Module Main
Public TestA as cTestBase
Public TestB as cDummyBase
End Module
End Namespace

A VB file that uses them calls
Imports Utility
and then
TestA.functionIncTestBase()
TestB.functionIncDummyBase()
to call a function within.

What I was wondering is if there is any way to create some sort of
namespace like
Namespace Utility.TestA
Namespace Utility.TestB
so that I do not need to specify the "TestA." all the time.

I know that I would use "With Test" but I have about ten instances of
classes for which I would like to do that and I don't think I can nest
With statements?

Thanks!
Joe

Mar 2 '06 #1
4 889
Hi Joe
Namespaces are a logical grouping of classes. If you want to call a
method of the class, you must create an instance of the class and call
the method by the instance name (not Shared Member ). So it's
impossible to igone instance name and calling only Class Members.

Thanks,
A.Hadi

Mar 2 '06 #2
"Joe HM" <un*******@yahoo.com> schrieb
Hello -

I have a set of utilities that are structured as follows ...

Namespace Utility
Public Module Main
Public TestA as cTestBase
Public TestB as cDummyBase
End Module
End Namespace

A VB file that uses them calls
Imports Utility
and then
TestA.functionIncTestBase()
TestB.functionIncDummyBase()
to call a function within.

What I was wondering is if there is any way to create some sort of
namespace like
Namespace Utility.TestA
Namespace Utility.TestB
so that I do not need to specify the "TestA." all the time.

I know that I would use "With Test" but I have about ten instances
of classes for which I would like to do that and I don't think I can
nest With statements?

If the members are shared, you can import them like namespaces.
Armin
Mar 2 '06 #3
"Armin Zingler" <az*******@freenet.de> schrieb
If the members are shared, you can import them like namespaces.

"them" = the classes (not the members)
Armin

Mar 2 '06 #4
Thanks ... I'll give that a try!

Joe

Mar 3 '06 #5

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

Similar topics

1
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a...
3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
8
by: Petter Reinholdtsen | last post by:
I ran into a problem on HP-UX 11.00 the other day, where it refused to compile a program using 'using namespace std;' at the top. The reason seem to be that the compiler refuses to accept 'using...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
14
by: Tiraman | last post by:
Hi , I would like to use nested namespace . I have 3 namespace as dll's : Namespace A Namespace B Namespace C And i want to have some namespace that contain them all , some thing like
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: 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?
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
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...

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.