C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 699 Page Views: 

How many Access specifiers are there in C#?



Posted By: Avi Date: 1 October 2010 11:24:31 AM
 Answer:

There are 5 access specifiers in C#. They are as follows:- 1. public 2. private 3. protected 4. internal 5. protected internal


Posted By: avibtech


Date: 1 October 2010 11:24:31 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image bD0Fsf
Related Questions
C# : How do you declare extension method for string class?

How do you declare extension method for string class?

static class Sample { public static Function(this string s, /* other parameters */) {} }
Category: C# Date: 10/14/2010 12:03:31 AM
C# : What will be result of this code:
class C1 
{ protected int A = 0;
  public void B() { console.writeLine(A); }}
class C2 : C1 {public void B() { Console.WriteLine(A+10); }}
static void Main(string[] args)
{
C1 c = new C2();
c.B();
}
C# : What does the #region directive do?

What does the #region directive do?

It defines region in the code that can be collapsed into one line in Visual Studio
Category: C# Date: 10/13/2010 11:09:14 PM
C# : What does the ?? operator do?

What does the ?? operator do?

it returns left-hand operand if it is not null else right-hand.
Category: C# Date: 10/13/2010 10:35:47 PM
C# : How do you define indexer in interface?

How do you define indexer in interface?

public interface ISample { string this[int idx] {get;set;}}
Category: C# Date: 10/13/2010 10:21:14 PM