Abstract Class vs Interface in C# | C# Interview Questions | Csharp Interview Questions
Вставка
- Опубліковано 5 лют 2025
- abstract class vs interface in C#
For Full 60 plus C# Interview Questions www.questpond....
Below is the Full syllabus of C# interview question courses
C# Interview Questions and answers
Question 1 :- Explain difference between .NET and C# ?
Question 2 :- .NET Framework vs .NET Core vs .NET 5.0
Question 3 :- What is IL ( Intermediate Language) Code ?
Question 4 :- What is the use of JIT ( Just in time compiler) ?
Question 5 :- Is it possible to view IL code ?
Question 6 :- What is the benefit of compiling in to IL code ?
Question 7 :- Does .NET support multiple programming languages ?
Question 8 :- What is CLR ( Common Language Runtime) ?
Question 9 :- What is managed and unmanaged code ?
Question 10 :- Explain the importance of Garbage collector ?
Question 11 :- Can garbage collector claim unmanaged objects ?
Question 12 :- What is the importance of CTS ?
Question 13 :- Explain CLS ?
Question 14 :- Difference between Stack vs Heap ?
Question 15 :- What are Value types & Reference types?
Question 16 :- Explain boxing and unboxing ?
Question 17 :- What is consequence of boxing and unboxing ?
Question 18 :- Explain casting,implicit casting &explicit casting ?
Question 19 :- What can happen during explicit casting ?
Question 20 :- Differentiate between Array and ArrayList ?
Question 21 :- Whose performance is better array or arraylist ?
Question 22 :- What are generic collections ?
Question 23 :- What are threads (Multithreading)?
Question 24 :- How are threads different from TPL ?
Question 25 :- How do we handle exceptions in C#(try/catch)?
Question 26 :- What is the need of finally?
Question 27 :- Why do we need the out keyword ?
Question 28 :- What is the need of Delegates ?
Question 29 :- What are events ?
Question 30 :- difference between Abstract class and interface ?
Question 31 :- What is a delegate and How to create a delegate ?
Question 32 :- Where have you used delegates ?
Question 33 :- What is a Multicast delegates ?
Question 34 :- What is a Event ?
Question 35 :- How to create a event ?
Question 36 :- Delegate vs Events.
Question 37 :- What is a class and object ?
Question 38 :- Abstraction vs Encapsulation?
Question 39 :- Explain Inheritance ?
Question 40 :- Explain virtual keyword ?
Question 41 :- What is overriding ?
Question 42 :- Explain overloading ?
Question 43 :- Overloading vs Overriding ?
Question 44 :- What is polymorphism ?
Question 45 :- Can polymorphism work with out inheritance ?
Question 46 :- Explain static vs dynamic polymorphism ?
Question 47 :- Explain operator overloading ?
Question 48 :- Why do we need Abstract classes ?
Question 49 :- Are Abstract methods virtual ?
Question 50 :- Can we create a instance of Abstract classes ?
Question 51 :- Is it compulsory to implement Abstract methods ?
Question 52 :- Why simple base class replace Abstract class ?
Question 53 :- Explain interfaces and why do we need it ?
Question 54 :- Can we write logic in interface ?
Question 55 :- Can we define methods as private in interface ?
Question 56 :- Want to change interface whats the best practice ?
Question 57 :- Explain Multiple inheritance in Interface ?
Question 58 :- Explain Interface Segregation principle ?
Question 59 :- Can we create instance of interface ?
Question 60 :- Can we do Multiple inheritance with Abstract classes ?
See our other Step by Step video series below :-
For more such videos subscribe / questpondvideos
JavaScript Interview Questions: • JavaScript Interview Q...
Learn Angular tutorial step by step tinyurl.com/yc...
ASP.NET MVC Core Interview Questions with answers:- • ASP.NET MVC Interview ...
C# interview questions and answers:- • C# Interview Questions...
C# tutorial for beginners(4 hrs):- • C# Tutorial for Beginn...
Learn Azure Step by Step:- • Azure Tutorial for Beg...
Azure AZ-900 fundamentals certification :- • AZ 900 Certification |...
AZ- 204 certification Azure:- • Azure 204 Certificatio...
Learn MVC 5 step by step in 16 hours:- • Learn ASP.NET MVC 5 ( ...
Learn Design Pattern Step by Step goo.gl/eJdn0m
Learn MSBI Step by Step in 32 hours:- goo.gl/TTpFZN
Learn SQL Server Step by Step tinyurl.com/ja4...
Python Tutorial for Beginners:- • Python Tutorial for Be...
Learn Data Science in 1 hour :- tinyurl.com/y5...
Learn Power BI Step by Step:- tinyurl.com/y6...
PHP Interview Questions : • PHP Interview Question...
For more details contact questpond@questpond.com OR call +919967590707-9619842789.
#AbstractClassVSInterfacesinC# #CSharpInterviewQuestions #C#InterviewQuestions&Answers #CSharpQuestions #CSharpAbstractClass #C#Interface #C#InterviewQuestionsforFreshers #InterviewQuestionsforC#
30 Important C# Interview Questions : ua-cam.com/video/BKynEBPqiIM/v-deo.html
Software Architecture Interview Questions : ua-cam.com/video/AtTgcbLOqMM/v-deo.html
25+ OOPS Interview Questions : ua-cam.com/video/u99wAoBjDvQ/v-deo.html
20+ SQL Server Interview Questions : ua-cam.com/video/SEdAF8mSKS4/v-deo.html
10+ Power BI Interview Questions : ua-cam.com/video/Cozc9WNBRt4/v-deo.html
20 MSBI Interview Questions : ua-cam.com/video/Nw_sHEKnOUE/v-deo.html
SQL Server Joins : ua-cam.com/video/KTvYHEntvn8/v-deo.html
SQL Step by Step - ua-cam.com/video/uGlfP9o7kmY/v-deo.html
Angular Step by Step Tutorial for Beginners : ua-cam.com/video/-9VcW7MBDs8/v-deo.html
25 Angular Interview Questions : ua-cam.com/video/-jeoyDJDsSM/v-deo.html
25 Important ASP.NET Interview Questions : ua-cam.com/video/pXmMdmJUC0g/v-deo.html
35 Important JavaScript Interview Questions : ua-cam.com/video/Zb4dPi7CANU/v-deo.html
20 MySQL Interview Questions : ua-cam.com/video/9hfjC-BpY20/v-deo.html
5 MSBI Interview Questions : ua-cam.com/video/5E815aXAwYQ/v-deo.html
20 PHP Interview Questions : ua-cam.com/video/1bpNSynUrl8/v-deo.html
Why haven't you inherited enquiry in customer class of abstract
Thanks!
Thank you for your support.
the explaination is so clean and crisp!!!
Very good lesson!! Finally I understand the difference between abstract classes and interfaces!! Thank you!!
Thanks. Do visit www.questpond.com/c-step-by-step-with-interview-questions---answers-series/cid62
This videos is best explanation I found on youtube, it almost clears all the doubts that confused me again and again about the differences between interfaces and absract classes.
Thank you very much sir and god bless you
This is the topic I couldn't understand for a long time. You just explained it so well, I got that immediately. Thank You very much!
such a nice explanation, I watched many but no one cleared the concepts to this level. Thank you sir.
Best explanation of the subject I’ve heard.
Keep uploading ❤
Thanks so much. You explanations are always thorough, clear and easily understood.
Complex topic explained very beautifully.Thank you
The best ever explation for this question❤
Thank you sir :)
Well explained 👍
Well explained. Even from your hometown the hunger to spread knowledge does not go. If Teaching is your hobby, learning is ours. Both are hungry
Thanks sir for appreciation.
May God bless you. Your session is very crystal clear narratiion.
U are so good in explaining. Thanks for sharing this information 🙂🙂
Nice job
Examples are fabulous . Thanks
Nice Explanation
Thank you so much for the video. you are a good teacher. Started to watch your courses.
It is very clear... Good explanation...
Sir,
As per the recent c# update, Beginning with C# 8.0, an interface may define default implementations for some or all of its members. So it would be now difficult to differentiate between abstract and interface...please review the update and highlight the differences...Thanks for the video, it was really detailed.
This still does not change the fact that in C# a class can implement multiple interfaces but inherit from only one abstract class. In a language like C++ that supports multiple inheritance of classes, there is no technical difference between an interface and a pure abstract class (and indeed, C++ has no notion of an interface). This is not the case with C# and Java though.
@@moravec481 that is one thing, however, when it comes to implementation of methods, how can we differentiate between both?
Best explanation I've ever seen.
very very very well explained.
Many thanks for your Video. Very helpful
Crystal clear explanation.. thank you..
Thanks. Do visit www.questpond.com/c-step-by-step-with-interview-questions---answers-series/cid62
Well explained. video helped in clearing the doubt of pure abstract. Your way of explaining the concept in simplest possible form and that too with demonstration that's like cherry on the cake. Can you please share what are important concept that needs to be learnt in entity framework.
Thousand likes for making such an useful video. I have learnt a lot about the differences. Thanks. Please keep uploading great videos to assist us fellow devs to understand better. The docs and stackoverflow at times are complicated
I do inquires all the time. Beautiful video regardless.
He is a genius man
Very very nice video sir
Thank you very much for this video.
You gain one more follower in me.
Well explained sir,thanks a lot ...gratitude
One of the key advantage of interfaces over abstract classes is how they are being used in loose coupling.
Thanks.. great explanation.. seriously still everyone asks this question.. I don’t know whyy!!!
Super explanation, Congratulate friend.
Cleared all doubt .thanks a tone Sir👍
greate job, thank you
Thank you so much sir
Thank you , really Enjoyed it and understood the concept 😬
excellent...no more disc. abstract vs interface😆
Very well explained sir.
Thanks. Do visit www.questpond.com/c-step-by-step-with-interview-questions---answers-series/cid62
thank you very much for the video it helped me a lot!
Thanks!! great
I can't thank you enough!
Amazing and clear! Thank you so much 😍
simple yet a professional explanation, I am thinking of joining the courses in website but it is a little confusing since there are a lot of courses there ! I think it would be great if you consider making a (guide map) pdf or video that explain the target of all courses or study paths ?
Thanks. Do visit www.questpond.com/c-step-by-step-with-interview-questions---answers-series/cid62
When its .NET and C# only one king in India Shivprasad Koirala....This video takes you to different level of thinking.
There are many better c# devs than me , its just that i create videos on youtube , write books so people know me. :-)
@@questpondvideos this is called remaining down to earth.. Dev's are many but the way you express/explain can be done by very few
very good explanation thanks!
If you only need to know the overall difference: 5:10
great explanations man!!! great work. much appreciated. peace!
awesome video! thanks a lot!
thank you sir. where can i find interview questions about SOLID principles for freshers?
Thanks. My question is: how to save all classes who implemented interfaces as xml file into one single file? Can you provide an example? And how to load that file after? I never found this on net.
Thank you Sir.
In this example, why not derive the Customer class from parent class CustomerEnquiry. Then Lead could be derived from parent CustomerEnquiry and PlatiniumCustomer could be derived from parent Customer. Does this not accomplish the same thing? Why is using interfaces better than this solution? (An honest question from someone trying to have a better understanding)
Sir After c# 8- 2019, Microsoft has introduced default method implementation in the Interfaces.
For 8 years of experience can u suggest wat are the questions should I focus on??
❤
Sir are you related to Manisha Koirala
Thank you sir 🙏 very well explained. Can you please make a video on oops concepts.. this is also a commonly asked interview question ..
Hello Archana, under membership you can find c# interview Q&A video on OOPs concepts too i.e. Part 4.
Why would I do planning in the code? I can plan the code prior to coding using UML for example, it doesn’t make since?
Documents like UML and word does not bring enforcement in the code like interfaces....We all know document is always out of synch with code.
@@questpondvideos you mean do not bring?
@@tko9753 🙂 yes
Interfaces are very useful on large projects where there are multiple programmers, so the code doesn’t turn into a dogs dinner?
Is this fair to say?
yes it is so true that it does become a Dog dinner. But i think in interview technical explanation would be needed.
Thank you so much Sir🙏
Thanks. Do visit www.questpond.com/c-step-by-step-with-interview-questions---answers-series/cid62
Thanks sir :)
loved the clarity and emphasis on your voice. It was indeed a very good explanation
Why haven't you inherited enquiry in customer class of abstract
I have one question. U said we cannot do multiple inheritance in C#, but we could do multilevel inheritance.
We could have an EnquiryCustomer with name prop and Enquiry () and a Customer which inherits from EnquiryCustomer and has discount () then concrete classes can inherit from Customer class.
I too have this same question sir..
Why would you create 2 classes only to be inherited from concrete classes further down in the same hierarchy?
i have membership. how can I download pdf for interview questions
Check first part of each series for PDF download link in the description.
@@questpondvideos Couldn't find any link to download .could you please help
@@steffymaryjose5828 Check Part1 of C#, ASP.NET MVC, Angular, SQL interview Q&A videos. Links are already given in the description.
Conclusion : interface can support multiple inheritance
What is the difference between ICustomer buyer_as_interface_type = new Customer() and Customer lead_from_class_type = new Customer() ?