:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Microsoft Related >> C Sharp


 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1443)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
What are the access-specifiers available in c#?
 Question Submitted By :: C-Sharp
I also faced this Question!!     Answer Posted By  
# 1
The access-specifiers available in C# are:

1. public - The member can be accessed from anywhere
2. internal - The member can only be accessed from type it
originates from or other types in the same assembly
3. protected - The member can only be accessed from the type
it originates from or from detrieved types of the
originating type
4. protected internal - implies protected OR internal ( not
protected AND internal )
5. private - The member is only accessible by other members
within the type it originates from.
Is This Answer Correct ?    232 Yes 32 No
# 2
5.protected internal
Is This Answer Correct ?    126 Yes 21 No
# 3
1. Public: Any member declared public can be accessed from
outside the class.

2. Private: it allows a class to hide its member variables
and member functions from other class objects and function.
Therefore, the private member of a class is not visible
outside a class. if a member is declared private, only the
functions of that class access the member.

3. Protected: This also allows a class to hide its member
var. and member func. from other class objects and
function, except the child class. it becomes important
while implementing inheritance.

4. Internal: Internal member can be expose to other
function and objects. it can be accessed from any class or
method defined within the application in which the member
is defined

5. Protected Internal: it's similar to Protected access
specifier, it also allows a class to hide its member
variables and member function to be accessed from other
class objects and function, excepts child class, within the
application. used while implementing inheritance.
Is This Answer Correct ?    124 Yes 23 No
Anupam Dixit
# 4
protected internal
Is This Answer Correct ?    51 Yes 18 No
Vaibhav Ichake
# 5
Is This Answer Correct ?    53 Yes 22 No
# 6
Public,private,protected,internal,protected internal. 
Is This Answer Correct ?    42 Yes 14 No
# 7
An access specifier determines how other parts of a program
can access a class member.

Member access is controled by five access specifiers:

1. public,
2. private,
3. protected,
4. internal.
5. protected internal

1. public member can be accessed by any other code in
your program.
2. Main() is declared as public because it will be called
by code outside of its class (the operating system).
3. private member can be accessed only by other members
of its class.
4. A protected member is public within a class hierarchy,
but private outside that hierarchy.
5. A protected member is created by using the protected
access modifier.
6. The internal modifier declares that a member is known
throughout all files in an assembly, but unknown outside
that assembly.
7. The protected internal access level can be given only
to class members.
8. A member declared with protected internal access is
accessible within its own assembly or to derived types.
Is This Answer Correct ?    31 Yes 5 No
Kishor Niit Ottapalam
# 8
What is default accesssecifier for method in c#? 
Is This Answer Correct ?    56 Yes 36 No
# 9
5.protected internal
Is This Answer Correct ?    21 Yes 6 No
# 10
C# provide five access specifiers , they are as follows :

public, private , protected , internal and protected
internal .

public :

public is the most common access specifier in C# . It can
be access from anywhere, that means there is no restriction
on accessibility. The scope of the accessibility is inside
class as well as outside. The type or member can be
accessed by any other code in the same assembly or another
assembly that references it.

private :

The scope of the accessibility is limited only inside the
classes or struct in which they are declared. The private
members cannot be accessed outside the class and it is the
least permissive access level.

protected :

The scope of accessibility is limited within the class or
struct and the class derived (Inherited )from this class.

internal :

The internal access modifiers can access within the program
that contain its declarations and also access within the
same assembly level but not from another assembly.

protected internal :

Protected Internal member can be accessed as a Internal
member within the assembly and as a protected member
outside the assembly.
Is This Answer Correct ?    18 Yes 4 No
Md Eqbal Ansari

Other C Sharp Interview Questions
  Question Asked @ Answers
Why are there five tracing levels in System.Diagnostics.TraceSwitcher?   1
What is short circuit logical evaluation? TCS 1
What is stack and heap? Wipro 7
Hai, I want to open a new form while the previous form is hiding or closing. I tried this with using MDI.I created one form like ParentForm.placed one button control.when clicked one that it opend new form like ChildForm.When i set the property of ChildForm to Maximize,but the ParentForm button control also appearing on the childform. so plz help me how to hide parentform controls(hide parentform while it is childform opened) thanq..   1
Why is it a bad idea to throw your own exceptions?   4
In Main function another function is there and to that function if we pass string as parameter ,then that string value is passed by value or reference type? Honeywell 4
If all code is written in a try block and write a catch block with Exception type Exception .In that scenario will all the exceptions catched by that catch block? or any exceptions which will not be caught? Honeywell 3
what is CSharp   6
What are the different generaions of Garbage Collection and how do they work   4
what is webapplication? what is windows application? what is the extension for both . in what purpose we r using webapplication. in which situation we r using windowns application   1
Did it possible to cast a generic type of derived class to generic type of base class? TCS 2
what is application domain? Kanbay 4
For more C Sharp Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::