Results 1 to 4 of 4

Thread: How would you define the scope of Public, Private, Friend procedures?

  1. #1
    Join Date
    Feb 2009
    Posts
    7

    How would you define the scope of Public, Private, Friend procedures?

    Hi,

    How would you define the scope of Public, Private, Friend procedures?

  2. #2
    Join Date
    Jan 2009
    Posts
    36

    Re: How would you define the scope of Public, Private, Friend procedures?

    Public procedure is available anywhere it is global
    private procedure is accessible only within the class where it is declared
    friend procedure is available outside the class but not outside the project in which it is declared

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: How would you define the scope of Public, Private, Friend procedures?

    The set of public variables, methods, properties, and events described in a class module define the interface for an object. The interface consists of the object members that are available to a programmer who's using the object
    from code.
    You can create private variables, methods, properties, and events that are used by other procedures within the class module but are not part of the object's public interface. Additionally, constants user-defined types, and Declare statements within a class module must always be private.
    The Friend keyword makes a procedure private to the project: The procedure is available to any code running within the project, but it is not available to a referencing project.

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: How would you define the scope of Public, Private, Friend procedures?

    When we declare private procedure that procedure can be access with in the current module.It can't be access out side the module.private key word use for data hiding purpose.In case of Friend key word,we can access the procedure through out the current project.Public is fully different from Private & Friend.It can be access out side the project & Current Project.Out Side project means,if we declare create dll,the type library of dll will contain that public procedure as a method of dll but not private & Friend.

Similar Threads

  1. Difference between Public and Private Cloud
    By Abi.RauT in forum Technology & Internet
    Replies: 4
    Last Post: 30-05-2012, 03:10 PM
  2. Can't change network settings from public to private
    By Henri@ksen in forum Vista Help
    Replies: 1
    Last Post: 02-04-2012, 02:11 AM
  3. Settings up public or private network and ICS
    By aNGRY gANESHAN in forum Vista Help
    Replies: 8
    Last Post: 20-03-2012, 12:17 AM
  4. Replies: 2
    Last Post: 13-08-2010, 11:15 AM
  5. problem identification ssh public key private on mac os x
    By Hugo Boss in forum Networking & Security
    Replies: 2
    Last Post: 30-03-2009, 02:36 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,897,408.28389 seconds with 17 queries