|
-
Nov 12th, 2001, 10:37 PM
#1
What is Friend?
Can someone please explain what the Friend keyword does.
Thanks
-
Nov 12th, 2001, 10:54 PM
#2
PowerPoster
Okay. I could be completely wrong, but I'll give ya the VB6 explanation of what the Friend property is, since I have just now dived into the world of .Net. Friend basically exposes functionality to other objects (classes) within a component, yet shields it's own existence to the outside world. For example, me, a client application that references a particular component. There might be a friend property or function within the component called 'LogEvent', which logs a certain event whenever something happens within the component. All of the guys within the component know the property (or function) exists, but me, the client, have no idea that 'LogEvent' even exists. I hope my example makes clears things up for you.
-
Nov 13th, 2001, 09:57 AM
#3
That sounds correct to me. A summary
Private - Available only to the scope of which it is declared
Friend - Available Application wide
Public - Available to any outside application.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|