Top 50 OOPS C# Interview Questions - .NET

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 241

  • @rakeshshettigar2817
    @rakeshshettigar2817 2 роки тому +40

    Hi Sir. This question bank helped me a lot to clear more than 5 interviews where I was finding difficulty in clearing one interview, a great salute to you for helping in building someone's career. Will keep supporting you💗🙂

    • @interviewhappy
      @interviewhappy  2 роки тому +7

      Well done and Congrats Rakesh.... May you keep getting success in your career in future.

    • @kiranpylla
      @kiranpylla Рік тому

      Hello rakesh, can you please share you interview experience. and how to get new job. at present i am working with dotnet technology only, but unable to take out preparation time. Can we form any group and discuss there.

    • @bluesparrow2.027
      @bluesparrow2.027 Рік тому

      Hi sir I cleared first round but I'm getting problem in second round like practical round if u guide about practical round plss it's humble request

    • @AbhaySingh-lf4oy
      @AbhaySingh-lf4oy 11 місяців тому

      @@kiranpyllayes definitely make a group

    • @girijaprasad7517
      @girijaprasad7517 8 місяців тому

      ​@@AbhaySingh-lf4oyi am also in. Let's connect Nd form a group

  • @jyothisikhinam6030
    @jyothisikhinam6030 Рік тому +3

    i'm preparing for interviews ...by watching your vedios sir... tqq so much these are very helpful..to growup

    • @interviewhappy
      @interviewhappy  Рік тому

      Thanks Jyothi and all the best for your career.

  • @NavinKumar-pm2ec
    @NavinKumar-pm2ec 2 роки тому +13

    This is great Man. Very Nice explanation. Every one should go once at least once for quick revision. Salute.💛💛

  • @isharasamintha-csc
    @isharasamintha-csc Рік тому +2

    Hi Happy,
    Your videos(Angular,SQL,OOP,.Net Core) was very helpful to me to get the new position.
    Thank You♥♥

    • @interviewhappy
      @interviewhappy  Рік тому

      Great... congrats man.... enjoy the moment. Happy is happy for you.

  • @rihamhossain9662
    @rihamhossain9662 Рік тому +2

    You are so amazing with this question. You teach this concept so easily that no can do that. I understand so many things from you. Thank you sir
    . 😀

    • @interviewhappy
      @interviewhappy  Рік тому

      Thanks for appreciating my friend your words are very kind and means a lot to me. Thank you much @rihamhossain9662

  • @catherineberkmans6734
    @catherineberkmans6734 Рік тому +1

    This is a fantastic video and helped me quickly brush-up the concepts. I loved the delegated part. This was by far the simplest explanation of it I have heard of...👏

  • @hareeshponnam1661
    @hareeshponnam1661 2 роки тому +5

    Really best explanation for each every question. Thank you very much your videos. I'm always thankful you 🙏

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Hareesh. All the best if you are preparing for interviews.

  • @mohamedsilmy5294
    @mohamedsilmy5294 Рік тому +2

    one of the best ever interview guide for any discipline I came across. Hats off to you sir.

  • @developerrihab7993
    @developerrihab7993 2 роки тому +9

    Wooooow excellent explaination ... i encourage you to continue ..make us a design pattern video I couldn't find any good one

  • @suryakantdixit2721
    @suryakantdixit2721 2 роки тому +2

    thanks for your effort that you put togethor all imp questions in one video

  • @roshanpoudel2594
    @roshanpoudel2594 Рік тому +1

    Perfect...it clears all of my doubt...hats off...keep it up !!

  • @mocococo2877
    @mocococo2877 Рік тому +1

    Thank you for your nice tutorial. I am finishing the first hour.
    For the moment I have two little notes. I think members of the interface do not have access specifiers and I think I have seen books saying that interfaces can also have property members and events.
    I also think that the main reason for boxing and unboxing was to achieve universal data type - object, which could be send as params to any class ctors and methods. Then generics came and send those to the unemployment department.

  • @CyberWorldReality
    @CyberWorldReality 8 місяців тому

    Amazing work. Probably the best c# video to date!

  • @vikrambardhan644
    @vikrambardhan644 2 роки тому +3

    Thank you so much. very nice explanation with examples. it consolidated everything at single place. so no need to go other place. once again thank you so much.

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Vikram... I appreciate you liked it..

  • @gopinivas
    @gopinivas 2 роки тому

    Now I am able to clear the interview after seeing your video.thanks

  • @babarmughal8891
    @babarmughal8891 Рік тому +1

    Just want to say, amazing

    • @interviewhappy
      @interviewhappy  Рік тому +1

      Thanks Babar. Glad you liked it. All the best for your career.

    • @babarmughal8891
      @babarmughal8891 Рік тому

      @@interviewhappy Well, I am a software engineer doing job. I watched your video to clear OOP Concepts. Thank you for mind blowing content. Keep posting stuff like that.

  • @farhataliksp
    @farhataliksp 11 місяців тому

    IEnumerable Interface should be used for the IN Memory object Collection to fetch the data while IQuerable should be used when you are fetching the from the resources like DbContext , XML etc because if you want the collect the data on filter criteria then IQuerable useful in this case.

  • @khanfaizan05
    @khanfaizan05 5 місяців тому +1

    Happy sir.. thank you so much.. i watched your video and purchased an interview course on udemy for preparation and revision..
    Finally got the offer..
    Thank you so much ..
    Lots of love and respect..
    Keep up the good work.
    ❤❤

    • @interviewhappy
      @interviewhappy  5 місяців тому +1

      Congratulations to my friend.
      This achievement is a result of your hard effort and never-give-up attitude.

  • @gatemcq5226
    @gatemcq5226 2 роки тому +2

    Superb interview series of question with explanation.

  • @Sravanthi_KidsGames
    @Sravanthi_KidsGames 7 місяців тому

    It's very useful for most of the questions covered from the material. Nice explanation in videos. Happy you tube channel and questpond you tube channel is enough to crack the interview for 2 to 4 year experience level of dotnet developer. Mostly 80 % expected questions. But presenting the level we need to practice

  • @entusiast2000
    @entusiast2000 Рік тому +1

    About encapsulation: you could add an example of errornous direct assign of experience to a negative value and add checks to a setter to show why the property setter is needed. Trivial setter just slows the things.

  • @anixop9606
    @anixop9606 2 роки тому +2

    No one can explain like this 👍

  • @fInDmEbRuh
    @fInDmEbRuh 11 місяців тому +1

    Interface can contain not only methods but also properties, events and indexers with signature only.

  • @vaninadhs8260
    @vaninadhs8260 9 місяців тому

    Excellent Bro. Well-articulated and examples . Thanks it helps

  • @sreenivasareddyganta2689
    @sreenivasareddyganta2689 2 роки тому +3

    Very nice explanation sir, thank you for bringing this it will be very helpful during the c# interview.

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Sreeni... Sounds great this helped you

    • @jamunadevi7635
      @jamunadevi7635 2 роки тому +1

      Hi sir ..Can you provide questions for 5+ years experience vb.net and asap.net. Thanks

    • @interviewhappy
      @interviewhappy  2 роки тому

      @@jamunadevi7635 I love vb.net. worked in it a lot. But now a days its not in demand. But soon i will try to make some content for it.

  • @anupamsharma7495
    @anupamsharma7495 2 роки тому +1

    Very good video. It includes everything for revision purpose. Kindly make a video on .Net Core also. Thanks.

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      Thanks Anupam, I already post a video on .NET Core also. Please check videos in my channel.

  • @touseefghazanfar8487
    @touseefghazanfar8487 2 роки тому +4

    You are an amazing teacher. Hats Off.

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      Thanks Touseef and all the best for your career man.

  • @mmaranta785
    @mmaranta785 2 роки тому +1

    I’m learning so much from your videos.

  • @pixelvlog666
    @pixelvlog666 2 роки тому +1

    thanks man . you helped me so much thank you again and again

  • @uddhavmhatre4627
    @uddhavmhatre4627 Рік тому

    Hi,Nice video.. you explain everything in detail.

  • @nileshmakwana4060
    @nileshmakwana4060 Рік тому +1

    Great

  • @rajendarraj7661
    @rajendarraj7661 2 роки тому +5

    No words to explain, appreciate the effort keepup the good work

  • @jt.633
    @jt.633 7 місяців тому

    2:34:17 I'm not sure if this is important but why did you initialize the delegate outside of the program class? Thank you you're the best C# interview teacher out there, I only watch yours!

    • @proxi_Laundasdasd
      @proxi_Laundasdasd 6 місяців тому

      becz deligates are meant to be used from outside classes. They work as a representative of things happening inside class.. So that anyone who wants to use them do not need to create instance of that class to use the delegate. instead they can directly call it and use it.

  • @Meenukrishnaarun
    @Meenukrishnaarun Рік тому

    Very nice explanation..thank you so much sir🙏

  • @vTFT2
    @vTFT2 2 роки тому +4

    such great effort bro.. really appreciate it!! :) those examples were really helpful in relating to use case...! this was awesome man!!

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Vipul, wish you all the best for your career.

  • @makinibryan
    @makinibryan Рік тому +1

    Awesome video, very informative!

  • @padmaraj690
    @padmaraj690 2 роки тому +4

    Thanks a ton for your effort. You are helping the techies to land their dream jobs.

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Raj. Yes my goal is to help the candidates in their interview process.

  • @kalaiselvanarchunan4678
    @kalaiselvanarchunan4678 2 роки тому +1

    2.29.23 Delegate example , really SUPER

  • @crazyyouthyoutubechannel6309

    You are like... A textbook... 😍

  • @ashvinitambe3023
    @ashvinitambe3023 2 роки тому +2

    hello sir plzz provide web api concept video and how it is created and also provide fresher level interview video. i like ur video and explanation.

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Ashvini. I poted a web api interview question series also. In starting questions, I have explained why web api is needed.

  • @eshwarmoorthy8071
    @eshwarmoorthy8071 2 роки тому +1

    Thank you sir for providing such a valuable resource

  • @Aparna.Ratheesh
    @Aparna.Ratheesh Рік тому +1

    Hi Sir, Thankyou for the detailed class. But 1 correction - In C#, the default access specifier for class members (fields, methods, properties, etc.) is private. If no access modifier is specified, members are implicitly considered private.

  • @ashrafkhan2958
    @ashrafkhan2958 2 роки тому +1

    good job male, thanks!

  • @rajatnagpure7445
    @rajatnagpure7445 Рік тому +1

    even after 2x it seems slow! Great Content Though👍

    • @interviewhappy
      @interviewhappy  Рік тому

      Thanks Rajat. I will try to increase speed from my side.

  • @FunAndCreativeCorner
    @FunAndCreativeCorner 2 роки тому +1

    Excellent video. Thank you sir.

  • @engineersINnight
    @engineersINnight Рік тому

    Good FAQs

  • @mridulpaul1378
    @mridulpaul1378 8 місяців тому

    Thank you for your nice tutorial. An interface can have properties as well.

  • @alicebeni
    @alicebeni Рік тому +1

    Thank you so much!!!!! It is very useful

  • @souravsinha2926
    @souravsinha2926 2 роки тому +2

    Thank you for explaining. Can overloading achieve by different return type

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      No Sourav, different return type, same parameters will lead to error.

  • @savithavadlagatta9379
    @savithavadlagatta9379 Рік тому +1

    Hi Sir, I have a question which was asked by an interviewer, what is the of the constructor in Abstract class.plz give me one example sir. and one more question is why do we need static fields/methods/constructors in application.what is the use of the that static thing.plz explain with example sir.

  • @shobhamahadev118
    @shobhamahadev118 11 місяців тому +1

    I think feilds can be defined in interface as per my memory.. correct me if jts wrong

  • @murtazotoshniyozov4688
    @murtazotoshniyozov4688 Рік тому

    Thank you sir for providing with this valuable resource)

  • @ralphpurtcher
    @ralphpurtcher Рік тому

    This video leaves me feeling quite discombobulated after listening to its definitions of the terms abstraction and encapsulation!!
    The video gives the defintion of abstraction as "Showing only required things". But that definition matches the Wikipedia definition for encapsulation, Wikipedia states encapsulation as being "the limiting of direct access to some of that data".
    I'm familiar with a very different definition of abstraction, which is the one you'll also find in the Webster dictionary, which is "disassociated from any specific instance".

  • @AmitKumar-ib7lc
    @AmitKumar-ib7lc 2 роки тому +2

    thanks a lot sir u r super

    • @interviewhappy
      @interviewhappy  2 роки тому

      Thanks Amit. All the best for your career.

  • @hadargabbay
    @hadargabbay Рік тому

    great video! keep up with the great work :)

  • @surendar2721
    @surendar2721 Рік тому

    Sir Question 22 . Generics class not required object creation ?

  • @techielovekid6121
    @techielovekid6121 3 місяці тому

    01:05:00 Boxing & Unboxing literally confused. Why should we used this in our OOP concepts? And is object keyword here?

  • @permallavennela2797
    @permallavennela2797 4 місяці тому

    Thank you so much your videos sir please make one video on upcasting and downcasting

  • @PANDURANG99
    @PANDURANG99 5 місяців тому

    13:23 where is baseclass 2 in case of multilevel inheritance? might be a mistake there

  • @theo-ov1vk
    @theo-ov1vk 2 роки тому +1

    if i pass my interview tomorrow i will donate you 50$ haha , thank you , really great job

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      You will definitely pass Theo. My best wishes are with you.

    • @theo-ov1vk
      @theo-ov1vk 2 роки тому +1

      @@interviewhappy I got the job today, you owe me fifty dollars

  • @widozein
    @widozein 2 роки тому +1

    Thanks a lot! This is really helpful

  • @deepakgupta5733
    @deepakgupta5733 2 роки тому +1

    Masterpiece 👍💖✨⭐✌️👏👌

  • @noranora847
    @noranora847 Рік тому

    Thank you so much for great explanation!

    • @interviewhappy
      @interviewhappy  Рік тому +1

      Your most welcome for appreciating @noranora847

  • @AbhishekGupta-zf4em
    @AbhishekGupta-zf4em 2 роки тому +1

    thanks Man, you are a gem :)

  • @microsoftgraphExplorer
    @microsoftgraphExplorer 2 роки тому +2

    why is throw ex used then? in which case it is beneficial ?

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      In some 5% cases, we do not need complete stack info then we can use this.

    • @microsoftgraphExplorer
      @microsoftgraphExplorer 2 роки тому

      @@interviewhappy Thank you for the information sir. Your videos are exponentially increasing my knowledge.

  • @laxmankere9479
    @laxmankere9479 2 роки тому +2

    Dear sir, can you make logical program series which should be contain 50 program based on String, Array, Collection...or if you have already please share link...i am automation Tester

  • @gopiyadavmartha1099
    @gopiyadavmartha1099 Рік тому

    Sir excellent explanation sir..
    But video quality little bit low pls sir

  • @anandhakumarjayarajan5498
    @anandhakumarjayarajan5498 Рік тому +1

    Can you explain Interface and Abstract class C# 8 version?

    • @interviewhappy
      @interviewhappy  Рік тому

      interface can have method bodies from C# 8. That is the biggest difference. Rest I will explain in some future videos.

  • @srishti_dixit
    @srishti_dixit 9 місяців тому

    At 2:29:22 if we want to do multiply also then we should again create object?

  • @pranjalichaudhari316
    @pranjalichaudhari316 2 роки тому +1

    Very nice video Sir but can you make a roadmap to become .net developer for fresher means step by step how to prepare to become .net developer

  • @576prakash
    @576prakash 2 роки тому +1

    Can you please try to video on above questions incase anything missed

  • @totoro3439
    @totoro3439 2 роки тому +2

    Sir if the object of an child class is created, will the constructor of its parent class from which its inherited be triggered?

    • @interviewhappy
      @interviewhappy  2 роки тому

      Good question totoro.
      Answer is YES.
      Both parent and child constructors will be called and parent will always be called before child.

    • @totoro3439
      @totoro3439 2 роки тому

      Woww, that's awesome, thank you sir

  • @vigneshvk4940
    @vigneshvk4940 Рік тому

    Hi @interviewHappy sir. If possible, can you please create one video for explicit calling concepts in multiple inheritance

  • @snehaa.tambade
    @snehaa.tambade Рік тому

    Abstract classes should have Protected constructor right ? so when derived class gets instantiated it will invoke the abstract members,?
    Please clarify

  • @ak_spotlight
    @ak_spotlight 2 роки тому

    17. What are Access Specifiers What is the default access modifier in a Class?
    What is the Other CODE?

  • @111niloy222
    @111niloy222 2 роки тому +4

    nice video Sir, one question is there, in abstract class also we can declare method and use it in dervied class , eg. SetSalary() and SetProject() can be only declared in abstract class also, then why should we use interface? Am I missing something?

    • @interviewhappy
      @interviewhappy  2 роки тому +4

      Because later if you want to do multiple inheritance than it is only possible via interfaces not via abstract classes.

    • @111niloy222
      @111niloy222 2 роки тому

      @@interviewhappy yes sir, got it now

  • @sayankolay6639
    @sayankolay6639 2 роки тому

    1:23:20 what is the need of finally block in try catch ? If we write the code what inside in the finally block after the catch block the code will excecute same as finally block so, what makes "finally" so important?

    • @khushaliporwal2582
      @khushaliporwal2582 7 місяців тому

      There are some scenarios where code written directly below a catch block might not execute as below:
      1. If an exception is not handled within the catch block and is instead propagated, any code written after the catch block will not execute.
      2. If a return statement is executed in the try or catch block, the control flow will exit the method, and the code following the catch block will not execute.
      3. If the method exits due to an exception, and there is no higher-level exception handler, the code following the catch block will not execute.
      The finally block executes no matter what happens in the try or catch blocks, including exceptions, return statements, or method termination.

  • @crazyyouthyoutubechannel6309
    @crazyyouthyoutubechannel6309 Рік тому +1

    I think Comment is not enough... But from my side... Take a bow man.....

    • @interviewhappy
      @interviewhappy  Рік тому

      I think thanks is not enough. Wish you all the very very best for your career bro.

  • @DanielJebaraj-db6of
    @DanielJebaraj-db6of Рік тому +1

    Please make videos about Entity Framework interview questions

  • @supriyaka2ru622
    @supriyaka2ru622 2 роки тому +1

    Hi sir, can you please provide the interview questions on azure developer

    • @interviewhappy
      @interviewhappy  2 роки тому

      Right now I don't have but soon I will create on Azure developer also.

  • @igors1953
    @igors1953 2 роки тому +4

    Q14 - why don't we just inherit a class and override the method instead here? Is it some kind of "safety feature" that prevents us from implementing the same method the same way in two separate classes?

  • @YogeshKumar-ok1ht
    @YogeshKumar-ok1ht 2 роки тому

    very good vedios Sir Keep it up

  • @muhammadnawaz1925
    @muhammadnawaz1925 Рік тому

    I have a question about abstraction you said that client show only nessasary detail in real example i understand butt in programing client show anly view UI page soo we hum kis se hide kerty hain background detail

  • @manisekaranp
    @manisekaranp Рік тому

    C# an abstract class can have multiple interfaces just like any other class

  • @sanocycles6642
    @sanocycles6642 2 роки тому +1

    In abraction explanation, 19:00 the remaining two methods should be private I guess. CalculateBasicSalary, calculateHRA.

  • @Ris-v4w
    @Ris-v4w 2 роки тому +1

    i jumped randomly into the video, at 10:35 and i already have an issue....
    sorry, but since when do classes inherit interfaces? multiple inheritance works only between interfaces. one interface can inherit multiple interfaces. classes have the obligation of IMPLEMENTING interfaces. only thing you can do is mimic multiple inheritance is by using functionality implemented by other classes and exposing this through your instance, which actually is called composition.
    so the statement that you can inherit multiple interfaces in a class is incorrect
    sorry...but finding an error on the first thing i see makes me not want to listen to the rest of it

    • @interviewhappy
      @interviewhappy  2 роки тому

      You sounds more accurate. But composition is not a very familiar term in C# and what I shared is more popular. Anyways, thanks for correcting me.

  • @HarunRasheed-hv6ck
    @HarunRasheed-hv6ck 2 роки тому +1

    Thank you sir

  • @sumitprakash3158
    @sumitprakash3158 3 місяці тому

    Hello Sir, please provide the design pattern video link.

  • @sreenivasareddyganta2689
    @sreenivasareddyganta2689 2 роки тому +1

    Could you do a video about design patterns and IQs on design pattrens.

    • @jayapradajena2031
      @jayapradajena2031 2 роки тому

      Because ur all tutorials are superb and u elaborate each from very basic and understandable 😌😊

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      Sure Sreeni.. I will in future

  • @prasadreddy1151
    @prasadreddy1151 2 роки тому +1

    Please do a video on solid principles and design patterns

  • @curious_cosmos2025
    @curious_cosmos2025 Рік тому

    Hi sir, in abstraction examples i have doubt ( 18:06 ) like we can still access calculateHra() method and calculateBasicSalary() method. So how we can achieve abstraction here.
    Can you please explain.
    Because one of the interviewer asked me.

    • @Kudaty1407
      @Kudaty1407 Рік тому

      Those methods should be PRIVATE. I hade the same question come into my head

  • @ranjeetnayak7701
    @ranjeetnayak7701 8 днів тому

    Why we can not create instance of interface or abstract class
    Why interfaces function having only declaration why its not hving body??

  • @kpadhnan
    @kpadhnan 2 роки тому +1

    Thank you

  • @deepaksamala77
    @deepaksamala77 2 роки тому +1

    Hi Happy, Which context
    we define class as sealed?

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      Hi Deepak, When you want any other developer can create the objects of your class but cannot inherit it.
      Static can be also used but then object creation is not possible.

  • @BalwantDhanda
    @BalwantDhanda 2 роки тому +2

    superb

    • @interviewhappy
      @interviewhappy  2 роки тому +1

      Thanks Balwant

    • @BalwantDhanda
      @BalwantDhanda 2 роки тому

      can you make video on solid principal in c# i didn't found better video

  • @prabhatverma955
    @prabhatverma955 Рік тому

    Thank you so much sir.

  • @shubhammali1170
    @shubhammali1170 2 роки тому +1

    What is Difference Between Method Overriding and Inheritance

    • @interviewhappy
      @interviewhappy  2 роки тому

      Inheritance is another concept of OOPS and method overriding is the part of Polymorphism concept.

  • @girijaprasad7517
    @girijaprasad7517 9 місяців тому

    I really need a mentor like you 'HAPPY JI'. Kindly accept my request. I will be grateful to you. One more request - can you please demonstrate on each language by creating a new fresh project. It will be helpful for us to understand on each module as how they interact with each other. And for architect level for whose year of experience is atleast 10years must have the knowledge to work from scratch so kindly request you to provide the inputs. It will be helpful for us in this output driven era. Thanks

  • @ahmedebrahem1674
    @ahmedebrahem1674 2 роки тому

    thankyou🥰🥰

  • @Shivanii_Reddy88
    @Shivanii_Reddy88 4 місяці тому

    Sir, Could you please clarify about delegates that..We can even pass the values by direct call of add method without delegate na.Then what is the actual use of that here..?