ALLInterview.com :: 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                      
Google
   
 
Categories >> Software >> Microsoft Related >> C Sharp
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions (614)
 C Sharp interview questions  C Sharp Interview Questions (721)
 ASP.NET interview questions  ASP.NET Interview Questions (1442)
 VB.NET interview questions  VB.NET Interview Questions (150)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (198)
 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)
Question
What are the access-specifiers available in c#?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are the access-specifiers available in c#?
Answer
# 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 ?    231 Yes 32 No
Ranganathkini
 
  Re: What are the access-specifiers available in c#?
Answer
# 2
Public,Private,Protected ,Friendly,protected friendly
are the access specifiers in c#.
 
Is This Answer Correct ?    37 Yes 182 No
Swapna
 
 
 
  Re: What are the access-specifiers available in c#?
Answer
# 3
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. private - The member is only accessible by other members
within the type it originates from.
 
Is This Answer Correct ?    52 Yes 65 No
Archana
 
  Re: What are the access-specifiers available in c#?
Answer
# 4
What is default accesssecifier for method in c#? 
Is This Answer Correct ?    56 Yes 36 No
Abhi
 
  Re: What are the access-specifiers available in c#?
Answer
# 5
1.public
2.private
3.protected
4.internal
5.protected internal
 
Is This Answer Correct ?    126 Yes 21 No
Mrinalini
 
  Re: What are the access-specifiers available in c#?
Answer
# 6
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
 
  Re: What are the access-specifiers available in c#?
Answer
# 7
public,private,protected,internal,protectedinternal,thumbfriend 
Is This Answer Correct ?    23 Yes 67 No
Yogaiah
 
  Re: What are the access-specifiers available in c#?
Answer
# 8
public,private,protected,internal,protectedinternal 
Is This Answer Correct ?    53 Yes 22 No
Vijay
 
  Re: What are the access-specifiers available in c#?
Answer
# 9
public
private
protected
interanl
protected internal
 
Is This Answer Correct ?    51 Yes 18 No
Vaibhav Ichake
 
  Re: What are the access-specifiers available in c#?
Answer
# 10
Public,private,protected,internal,protected internal. 
Is This Answer Correct ?    42 Yes 14 No
Shakira
 

 
 
 
Other C Sharp Interview Questions
 
  Question Asked @ Answers
 
How do you inherit from a class in C#? Visual-Soft 3
How To Maintain Transaction In C#? Phoenix-Technologies 1
What is manifest ? Digital-GlobalSoft 2
the selected inf of other combobox?How do you achieve it? Microsoft 1
hi, I am a begineer to c sharp. I have written a code for finding out prime numbers. Can anyone identify what are the flaws in my code. Kindly donot complex the code or present logic because i am new to c sharp and just started learning programming language.Thanks in advance. class Program { static void Main(string[] args) { int a,b=1; a = int.Parse(Console.ReadLine()); c= int.Parse(Console.ReadLine()); if (a % b == 0 && a % 2 != 0 && a % a == 0) Console.WriteLine(a); else if (a % b == 0 && a % 2 == 0) Console.WriteLine(a%2); Console.WriteLine("Number is not PRIME"); Console.ReadLine(); } } }   2
what is Anonymous Method.? and What is shadowing? ATS 2
What is Nullable Type in c# IBM 5
What is the partial class in C# What is the use of partial class in C#? CTS 6
STATIC METHOD CAN BE OVERLOADING AND OVERIDNG? IS POSSIBLE IN iN c# .NET AND WHAT IS THE REASON??   3
can we declare a variable by name "this" in a class? Please explain? IBM 3
What is the Difference between imperative and interrogative code? Wipro 2
What Are The .Net Object Reliance 2
 
For more C Sharp Interview Questions Click Here 
 
 
 
 
 


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

ALLInterview.com   ::  KalAajKal.com