Introduction
In this article, we will discuss some of the interview questions and will try to answer those. This article is for helping the fresher developers who are trying to crack their interview. I will not explain the whole concept here but will try to answer the main concept of each question. So, this article is just to polish your answers but it will not give you the deep insight of the concepts. For that, you can search each concept on C# Corner. So, let's start.
In this article, we will discuss some of the interview questions and will try to answer those. This article is for helping the fresher developers who are trying to crack their interview. I will not explain the whole concept here but will try to answer the main concept of each question. So, this article is just to polish your answers but it will not give you the deep insight of the concepts. For that, you can search each concept on C# Corner. So, let's start.
Question 1 - What is default Access Modifier of Class in C#.NET?
Ans - Default Access Modifier of class in C#.NET is Internal that hides all its members, variables, and function details from other classes and objects that come under a different namespace. Internal member can be accessed from anywhere within the same assembly, within the same project.
Question 2 - What do you mean by Access Modifier?
Ans - Access modifier means the accessibility of class, class members, and function. We use some keywords to define the scope of class and its members, like Public, Protected, Private, Internal, ProtectedInternal.
Question 3 - What is Sealed class?
Ans - We use Sealed keyword with the class when we want that the class shouldn't be inherited by another class.
Question 4 - If the Sealed classes prevent inheriting the class, then what is the use of Static Class?
Ans - Static classes implicitly are Sealed classes which also can't be inherited. But, there is some difference between Sealed and Static Class. For Example, 1) We cannot create the object of Static class but we can create object of Sealed Class; and, 2) Static class cannot inherit the features of other class but Sealed class can.
Question 5 - Can we have Non-static methods within a Static Class?
Ans - No, we can have only Static methods and members with in a static class.

abdellah aziziPosted Feb 11, 2018, 8:11 AM
That's great and what's the defferent between private and protected???
Dan SchroederPosted Sep 12, 2016, 12:28 AM
"Internal that hides all its members, variables, and function details from other classes and objects that come under a different namespace." I don't think this is correct. I believe "internal" only has to do with the assembly (i.e. project), not the namespace.
SubashPosted Sep 5, 2016, 10:01 PM
Usefulone
Rakesh KumarPosted Sep 5, 2016, 11:35 AM
Good
Vignesh ManiPosted Sep 4, 2016, 5:02 PM
Nice
Prasanna MuraliPosted Sep 4, 2016, 7:40 AM
Nice post
Tapan PatelPosted Sep 3, 2016, 7:22 PM
Nice Content For Beginners.