Tag: interview questions
What is the default modifier for the class in C#?
What is the default modifier for the class in C#? In C#, the default modifier for the class is internal. This is applicable of there is no modifier defined for the class. When the class is internal, then it is visible only within the current assembly.
C#.NET Interview Questions and Answers – Part 1
C#.NET Interview Questions and Answers – Part 1 1. What is an Assembly in .NET? An assembly is a unit of deployment in .NET. The assembly can either be an exe file or a dll (library). When there is an entry point for the assembly, then it’s an exe else it is a dll file. The advantage of the dll is that it can be…
What is the default modifier for the class member in C#?
What is the default modifier for the class member in C#? In C#, the default modifier for the class member is private. The member in this case will be visible only within the current class.
What Credentials are used when running with web context in SharePoint?
What Credentials are used when running with web context in SharePoint? The App Pool Identity of the SharePoint application is used when running with the SPSecurity.RunWithElevatedPrivileges mode.
What is the Difference between String and String Builder in C#?
What is the Difference between String and String Builder in C#? The string instance is immutable i.e. each time when you change the string m a new instance is returned. This can be inefficient sometimes The StringBuilder allows the developers to have a mutable string. This is a good option in case you want to modify / append string many times.
How to prevent the class from being inherited in C#?
How can one prevent the class from being inherited by another class using c#? It’s simple, mark the class as “sealed”. How to prevent the class from being inherited in C#?