C# Programming Interview Questions and Answers Pdf - 1
Question: 1
Give the advantages of inheritance?
Reuses the existing code and extends the functionality.
Add new members to the derived class.
Can replace the implementation of existing methods by overriding the method.
Use of override and virtual methods helps to exhibit polymorphic behavior.
Question: 2
What are the features of namespace?
Namespace is not a type.
Namespace are implicitly public.
The classes, struts, interfaces, enums and delegates are allowed
Global namespace is available.
Namespaces may be nested.
The namespace body contains using directives and type declarations.
Question: 3
Define sealed class and sealed methods?
A class that cannot be sub classed is called a sealed class.
It is achieved by using the keyword sealed. When an instance method declaration includes the sealed modifier, the method is said to be a sealed method. It means a derived class cannot override this method.
Question: 4
What is the use of new keyword in C#?
The C# allows the concept of method hiding using the keyword new.
While using the new keyword in the derived class it tells the compiler to hide the base class method.
The following program illustrates the use of new keyword and explains the method hiding.
Question: 5
Explain ACID rule of thumb for transactions?
A transaction must be:
Atomic- it is one unit of work and does not dependent on previous and following transactions.
Consistent-data is either committed or roll back, no “in-between” case where something has been updated and something hasn’t.
Isolated – no transaction sees the intermediate results of the current transaction.
Durable- the values persist if the data had been committed even if the system crashes right after.
Samacheer Kalvi 12th Computer Science Model Question Paper More
GATE Electronic Data Interchange Questions and Answers More
DBMS Multiple Choice Questions with Answers for GATE Pdf More
Computer Ethics MCQ Quiz with Answers More
IBPS Clerk Computer Awareness Question Bank Pdf More
Top 1,000+ Computer Awareness for Bank Exams Pdf More
7000+ Science and Technology Questions for UPSC Mains, Prelims Pdf More
1000+ RRB NTPC Reasoning Questions and Answers Pdf More
1000+ Reservoir Engineering Objective Questions and Answers More
Important Formulas, Shortcuts, Tips & Tricks on Odd Man Out Series More