C# Interview Questions with Answers Pdf - 1
Question: 1
How is method overriding different from overloading?
When overriding, you change the method behavior for a derived class.
Overloading simply involves having a method with the same name within the class.
Question: 2
What is an abstract class?
A class that cannot be instantiated.
A concept in C++ known as pure virtual method.
A class that must be inherited and have the methods over ridden.
Essentially, it’s a blueprint for a class without any implementation.
Question: 3
Are private class level variables inherited?
Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.
Question: 4
What is the advantage of using system.Text.StringBuilder over System.String?
StringBuilder is more efficient in cases where there is a large amount of string manipulation.
Strings are immutable, so each time a string is changed, a new instance in memory is created.
Question: 5
What is the syntax to inherit from a class in C#?
Place a colon and then the name of the base class.
Example: class MyNewClass: MyBaseClass
- C# Interview Questions and Answers for Freshers
- C# Interview Questions for Experienced Professionals
- C# Interview Questions and Answers for Experienced
- C# Interview Questions with Answers Pdf
- C Sharp Interview Questions and Answers
- C Sharp Interview Questions and Answers for Freshers Pdf
- Top 200+ Advanced C# Interview Questions 2019-2020
- C# Programming Online Test Questions and Answers
- C# Algorithm Interview Questions and Answers
Dc generator questions and answers pdf More
DC Generator Questions and Answers Pdf More
Electromagnetic Induction Quiz Questions and Answers More
Basic Electronics Quiz Questions with Answers Pdf More
Wireless Communication MCQ Questions with Answers More
100+ Easy Sports Quiz Questions and Answers More
Compiler Design Lab Exam Practical Viva Questions and Answers Pdf More
GK Questions on National and International Organizations Quiz Questions More
1000+ Puzzles asked in Interview with Answers More
Oracle DBA Interview Questions and Answers for Freshers More