Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books

.NET data modifiers


.NET data access modifiers

<<Previous  Next>>

.NET data access modifiers - August 25, 2008 at 18:00 PM by Amit Satpute

Define Data Access Modifier. 

Answer
Access Modifiers or Access specifiers provide a class, a variable or a function with accessibility. It means that they govern who can access them.  

What are the access modifiers available?    

Answer
There are five different access modifiers:

  • public: It specifies that it can be accessed by anyone.
  • private: Private declared variables, classes or functions can be accessed only by the member functions. No one from outside the class can access them.
  • protected: This access specifier is useful in a hierarchy wherein an access can be given only to the child classes.
  • internal: These limit an access only within an assembly. Its is similar to a friend function of C++.
  • protected internal: These limit the access within the assembly and to the child classes in the hierarchy.

What is the default access modifier for the member?

Answer
  VB.NET C#
Class variable Private Private
Class method Public Private
Structure variable Public Public
Structure method Public Private

<<Previous  Next>>


 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.