Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 28-02-2009
Member
 
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?
Reply With Quote
  #2  
Old 28-02-2009
Member
 
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
Reply With Quote
  #3  
Old 28-02-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
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.
Reply With Quote
  #4  
Old 28-02-2009
Member
 
Join Date: May 2008
Posts: 2,383
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.
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How would you define the scope of Public, Private, Friend procedures?"
Thread Thread Starter Forum Replies Last Post
Difference between Public and Private Cloud Abi.RauT Technology & Internet 4 30-05-2012 03:10 PM
Can't change network settings from public to private Henri@ksen Vista Help 1 02-04-2012 02:11 AM
Settings up public or private network and ICS aNGRY gANESHAN Vista Help 8 20-03-2012 12:17 AM
Play Modern Warfare 2 with your Friend Online [ Private Match ] bonda Video Games 2 13-08-2010 11:15 AM
problem identification ssh public key private on mac os x Hugo Boss Networking & Security 2 30-03-2009 02:36 PM


All times are GMT +5.5. The time now is 01:20 PM.