Results 1 to 2 of 2

Thread: [RESOLVED] Friend vs Protected

  1. #1
    Dorothy
    Guest

    Resolved [RESOLVED] Friend vs Protected

    Iam working with inheritance in VB.NET?

    I wish to know the difference between Freiend Sub and Protected Sub.

    Please explain it with a small example?

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Friend means the routine is visible to the entire program. Meaning any class in that app can call the sub.

    Protected means the routine can only be called by a class the inherits the class with the protected routine.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width