scope issues

G

Guest

Hi,

I am learning object oriented programming.

I am always running into scope issues in my C# ASP.NET applications.

example:

a public void methods:
My intellisense does not does up for all lot of methods for instance.

and I believe (not positive) that it gets even worse inside try blocks, if
statements, and for..next loops.

Could someone explain this?

or better yet: provide online resources that explain this aspect of OOD.

I am trying to bone up on my funadmentals but right now I need an answer.

thanks

chris
 
B

Bruce Wood

Can you give a small, complete code sample that demonstrates what
you're asking about?
 
J

Jeff Louie

Chris... to be clear. the type of the reference determines what you see
with
intellisense so object o = new MyClass() intellisense will only display
the
methods visible to an object reference o when you try to use the
reference
variable o. if you do MyClass mc= new MyClass() then intellisense will
display
the complete interface of MyClass when you try to use the reference
variable mc.

Regards,
Jeff
 
K

Kevin Spencer

Intellisense doesn't have much to do with scope or OOP, but more with the
IDE than anything else. The Intellisense in Visual Studio.Net 2005 is much
improved over VS.Net 2003. Still, it consumes quite a bit of resources in
either case, and sometimes it takes a little patience to see it catch up. In
VS.Net 2003 it sometimes doesn't seem to work at all, although this is
relatively rare, depending on your hardware/software configuration.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 

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