function not available

S

shapper

Hello,

I am working on a library which namespace is Parent.

Then I have 2 classes inside the following namespaces:

Class A > Namespace Parent.Base.Common

Class B > Namespace Parent.Web.UI.WebControls

I have a function inside class A as follows:

Public Function FindAll ...

From class B I am not able to access this function.

The only way to solve this is to make:

Public Shared Function FindAll ...

And in class B, where I use the function Find All, use:

Imports Base.Common

My question is:
Is this the only way to do this?
Class A and Class B are under a same namespace, i.e., Parent.

Shouldn't I from Class B be able to access a function in Class A?

Thanks,
Miguel
 
B

bruce barker

there are static (shared in vb) and instance methods. instance methods can
only be called from a class instance, otherwise this (me in vb) is undefined.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top