Friend vs Public

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey guys

What's the difference between

Public SomeValue as Strin
and
Friend SomeValue as String ??

THANX IN ADVANC
 
* "=?Utf-8?B?V2lsbA==?= said:
What's the difference between:

Public SomeValue as String
and
Friend SomeValue as String ???

If you are using VS.NET/VB.NET as IDE, just set the caret onto the word
('Public' or 'Friend') and press the F1 key.
 
Will said:
Hey guys,

What's the difference between:

Public SomeValue as String
and
Friend SomeValue as String ???

THANX IN ADVANCE

In the scope of one project it makes no difference.
It does, when you make a reference to this one from another project.
When you declare SomeValue as Friend, you won't see it.

BTW The documantation sux on this subject, one easy example would be better that all the stuff put
there.
 
You'll also find that if you try to scope a form as Friend that the
designer wont be able to design it.


Whats your reason from wanting to switch from public to friend? Theres
no point in doing it just for sake of it.

Im sure your being modest when you say 0.5% of what a developer should
know but if you want to get any better then reading up on the
fundamentals such as these Access Modifiers is a good place to start.

hth

Richard
 
Back
Top