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

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top