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

Small hosting system 4
Php code issue 0
Hello to community. 3
Import Class. Not Imports ... ? 2
Private and Protected Inheritance 3
Problem with event handler 0
Event question 0
Makefile questions 0

Members online

Forum statistics

Threads
474,266
Messages
2,571,074
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top