Public, Private, Protected? Thanks.

S

Shapper

Hello,

What is the difference of using:

Sub function()
Public Sub function()
Private Sub function()
Protected Sub function()

I place all my functions in my aspx.vb files but I have some problems
when deciding when to use Public, Private, Protected or none.

Thank You,
Miguel
 
M

Manohar Kamath

Public == Available to everyone who can access the class
Private == Available only within the class where the function/variable is
declared
protected = Available only within the class, or any class that is derived
from the class
 
E

Eliyahu Goldin

Miguel,

I personally think it's ok to ask any questions. But for your own benefit
grab one of these books teaching programming and read it.

Eliyahu
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top