By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,270 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,270 IT Pros & Developers. It's quick & easy.

"Private Shared Function"

P: n/a
I have trouble with some of the concepts of OOP, and am struggling
currently with Private Shared Functions.

I think I understand Private (not available outside the class).

I think I understand Shared (available without having to instantiate a
class).

So how could a Private Shared Function be called? Why give it this
particular scope?

Sorry if this is one of those Doh! questions.

Edward
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Private Shared methods and variables are essentially private methods or
variables that can be accessed from within Public Shared members.

Since it is not possible to call Instance members (private, public, etc.)
from Shared members, you can use Private Shared members to create helper
functions for Shared members (to help with overloads for example).

And don't worry, I had the same question myself until I first found a use
for it in a project I was working on :o)

Hope this helps,

Danny van Kasteel

"Edward" <te********@hotmail.com> wrote in message
news:25**************************@posting.google.c om...
I have trouble with some of the concepts of OOP, and am struggling
currently with Private Shared Functions.

I think I understand Private (not available outside the class).

I think I understand Shared (available without having to instantiate a
class).

So how could a Private Shared Function be called? Why give it this
particular scope?

Sorry if this is one of those Doh! questions.

Edward

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.