473,473 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Same namespace, different files

I have two files:

FileA.vb
FileB.vb

FileA.vb contains the following sample code:

NameSpace SomeNamespace
Public Class SomeClassA
Public Shared Function MethodA() As String
...
End Function
End Class
End NameSpace

FileB.vb contains the following sample code:

NameSpace SomeNamespace
Public Class SomeClassB
Public Sub MethodB()
Dim strA As String
Error? ---> strA = SomeNamespace.SomeClassA.MethodA()
...
End Sub
End Class
End NameSpace
What I'm trying to do is call the shared method, MethodA, in
SomeClassA in FileA.vb within FileB.vb. They both have the same
namespace. FileA.vb compiles fine into a .dll but Fileb.vb has
trouble compiling saying:

error BC30456: 'MethodA' is not a member of 'SomeNamespace'

Can I do this? I would like to keep the classes in their own seperate
files.

Thanks!
Jul 21 '05 #1
0 1232

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

Similar topics

2
by: Zombie | last post by:
Hi all, I wish to create a namespace other than the default one. Let's say, the Schema looks like: ----------------------------------------------------------------------- <?xml version="1.0"...
1
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
3
by: rehveli | last post by:
Isn't it possible to generate .cs files from schemas, where one schema imports another, and both have the same namespace? If a.xsd and b.xsd have namespace "MyNameSpace", and in b.xsd I do...
1
by: Rico Rivera | last post by:
I have two files: FileA.vb FileB.vb FileA.vb contains the following sample code: NameSpace SomeNamespace Public Class SomeClassA Public Shared Function MethodA() As String
14
by: Jon Rea | last post by:
I am currently cleaning up an application which was origainlly hashed together with speed of coding in mind and therefore contains quite a few "hacky" shortcuts. As part of this "revamping"...
1
by: Mark Denardo | last post by:
Ok here's my problem: I have a bunch of Classes at the same namespace level say "abc.xyz". And all Classes reside in different files. abc.xyz.Class1 (in Class1.vb) abc.xyz.Class2 (in...
3
by: rgparkins | last post by:
Hi This has been asked before but with no resolution so I am putting it out there again in case someone has an answer. 2 user controls with same name List.ascx but different namespace, and I...
2
by: quickcur | last post by:
Hi, I used to have different c code in different files and compiled as different programs. For example, I have proc1.c: int x1, x2; void work1()
3
by: nickyeng | last post by:
i have this : /*ab.h header file*/ .... .... namespace Enrol{ /*bla bla bla inside here*/ }; ... ...
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,...
1
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,...
0
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...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.