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

Home Posts Topics Members FAQ

Why can't I find my method?

I have a very simple "test" business layer and a very simple data layer. in
the data layer I have a simple public method. I import the reference of the
data layer (Imports MyDataLayer), and now I can create my object:

Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected. I don't get it? Intellisense sees the Datalayer and
the class. I declare it correctly but I cannot get to the method because it
says it is not declared??????
Nov 20 '05 #1
8 904
* "Aaron Ackerman" <no**@nospam.com> scripsit:
I have a very simple "test" business layer and a very simple data layer. in
the data layer I have a simple public method. I import the reference of the
data layer (Imports MyDataLayer), and now I can create my object:

Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected. I don't get it? Intellisense sees the Datalayer and
the class. I declare it correctly but I cannot get to the method because it
says it is not declared??????


What's the modifier of the method 'MyMethod'? Is it 'Public' or
'Friend'? Is there maybe a typo in the name of the method? What does
IntelliSense show?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
I said it was public.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OO**************@TK2MSFTNGP09.phx.gbl...
* "Aaron Ackerman" <no**@nospam.com> scripsit:
I have a very simple "test" business layer and a very simple data layer. in the data layer I have a simple public method. I import the reference of the data layer (Imports MyDataLayer), and now I can create my object:

Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected. I don't get it? Intellisense sees the Datalayer and the class. I declare it correctly but I cannot get to the method because it says it is not declared??????


What's the modifier of the method 'MyMethod'? Is it 'Public' or
'Friend'? Is there maybe a typo in the name of the method? What does
IntelliSense show?

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

Nov 20 '05 #3
Let's see your code. You do have a reference to the Data layer right?
"Aaron Ackerman" <no**@nospam.com> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
I have a very simple "test" business layer and a very simple data layer. in the data layer I have a simple public method. I import the reference of the data layer (Imports MyDataLayer), and now I can create my object:

Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected. I don't get it? Intellisense sees the Datalayer and
the class. I declare it correctly but I cannot get to the method because it says it is not declared??????

Nov 20 '05 #4
"Aaron Ackerman" <no**@nospam.com> schrieb
I have a very simple "test" business layer and a very simple data
layer. in the data layer I have a simple public method. I import the
reference of the data layer (Imports MyDataLayer), and now I can
create my object:

Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected. I don't get it? Intellisense sees the Datalayer
and the class. I declare it correctly but I cannot get to the method
because it says it is not declared??????


In which procedure is
MyObj.MyMethod
located?
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5
> Dim MyObj as New DataClass

But when I try to access the public method:

MyObj.MyMethod

I get the following error if i hover over the object:

Declaration expected.


Just guessing...

Do you have any other DataClass classes in your project, in other
namespaces? Maybe you only think that you instantiate MyDataLayer.DataClass,
while you instantiate SomeOtherNamespace.DataClass?

A copy-paste of your code would help to find the problem.

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
Nov 20 '05 #6
* "Aaron Ackerman" <no**@nospam.com> scripsit:
I said it was public.


Sorry, I missed that. Does the procedure show up in IntelliSense?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
Guessed you missed that too: "Intellisense sees the Datalayer and the
class"
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O4**************@TK2MSFTNGP11.phx.gbl...
* "Aaron Ackerman" <no**@nospam.com> scripsit:
I said it was public.


Sorry, I missed that. Does the procedure show up in IntelliSense?

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

Nov 20 '05 #8
* "Scott M." <s-***@BADSPAMsnet.net> scripsit:
Guessed you missed that too: "Intellisense sees the Datalayer and the
class"


You are right -- I'll take some sleep now...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #9

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

Similar topics

6
by: lawrence | last post by:
How dangerous or stupid is it for an object to have a reference to the object which contains it? If I have a class called $controllerForAll which has an arrray of all the objects that exist, what...
15
by: Prabu | last post by:
Hi, I'm new to python, so excuse me if i'm asking something dumb. Does python provide a mechanism to implement virtual functions? Can you please give a code snippet also...:) Thanx in advance...
12
by: Rubbrecht Philippe | last post by:
Hi there, According to documentation I read the ArrayList.IndexOf method uses the Object.Equals method to loop through the items in its list and locate the first index of an item that returns...
4
by: John Wolff | last post by:
Pardon me for such a newbie question. I've only been using C# for 14 months, and most of the stuff has been relatively basic. I have a serializable "Contact" class that has a number of...
5
gekko3558
by: gekko3558 | last post by:
I am writing a simple binary search tree (nodes are int nodes) with a BSTNode class and a BST class. I have followed the instructions from my C++ book, and now I am trying to get a remove method...
4
by: momov4 | last post by:
I can't seem to resolve these errors. I have had people compile these codes on their computers with no problem, but I keep getting errors...can anyone help???? Here are the errors: cannot find...
9
by: kj7ny | last post by:
Is there a way that I can programmatically find the name of a method I have created from within that method? I would like to be able to log a message from within that method (def) and I would like...
5
by: lukasmazur | last post by:
Hi I have a problem with using listBox1. I have a two forms form1 and form2. In form1 are controls listBox1, textBox1 and button witch creating object of class Form2. In class Form2 I create a...
3
by: allendowney | last post by:
Hi All. In a complex inheritance hierarchy, it is sometimes difficult to find where a method is defined. I thought it might be possible to get this info from the method object itself, but it...
10
by: CodeNoob | last post by:
please help been working on a project got it down to 5 errors from 100 now i have no idea what to do. Errors: init: deps-jar: Created dir: C:\Users\Tommy\Desktop\build\classes Compiling 306...
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
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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.

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.