Part 32 - C# Tutorial - Abstract classes in c#.avi

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 104

  • @psalt21
    @psalt21 7 лет назад +95

    I am completely blown away by the quality of information found in all your videos. I have watched many of your videos and I always learn so much. You are a blessed educator. Please do not stop you have found your calling in life!!!

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  11 лет назад +4

    Thank you very much for taking time to give feedback. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video. For email alerts, when new videos are uploaded, you may subscribe to my channel.

  • @codeme8016
    @codeme8016 Год назад +3

    After years, still your videos are the best and most clear explanations. Truly appreciated.

  • @zainafzal4226
    @zainafzal4226 6 лет назад

    Your explanations are extremely easy to understand. I am doing a Pluralsight course on C# and whenever I don't understand any concept there, I listen to your video(on that particular topic) and it CLICKS!! Thanks a bunch for these videos and for being an tremendous tutor

  • @Hilinas_Lifestyle
    @Hilinas_Lifestyle 2 года назад

    I came across your videos yesterday and since then i am really blown away. You are such a great Teacher, this channel is the best one. God bless you for your work 😊

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  12 лет назад +7

    Not really, interfaces can only have declarations and not implementations, where as abstract classes can have implementations as well as abstract members (just member declarations without implementations)

  • @dineshcs2004
    @dineshcs2004 10 лет назад +5

    Hi, Venkat Sir, Thanks for providing such type of video tutorials. Really awesome for new start!! Even few videos are helpful for experienced people as well to make transparent their concepts...

  • @tamarastamenic6863
    @tamarastamenic6863 7 лет назад +5

    Thank you to the moon and back, this helped me to pass my exam!!

  • @bhavyaparikh6933
    @bhavyaparikh6933 3 года назад +1

    actually he is saying in every video like we will take about access modifier in latter videos but we understand the meaning very tremendous job!!!!!

  • @ga7853
    @ga7853 5 лет назад

    Venkat, you are a blessing for new comers to c#. Thank you so much.

  • @ronyissporty
    @ronyissporty 10 лет назад

    Very gud Venkat sir.......I don't have enough word to describe your excellent teaching skills......your videos are really helpful.

  • @pasito287
    @pasito287 Год назад

    this can't be more better ,its already a very good resource

  • @TheManubarcafan
    @TheManubarcafan 10 лет назад +6

    as always....
    you are an artist

  • @armennagapetian7779
    @armennagapetian7779 5 лет назад +1

    Best explanation for the Abstract class i have came across

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  11 лет назад +1

    Hi Akash, if you use virtual methods, you will have to provide a default implementation. However, there may be cases, where we don't want to provide any default implementation. This is one example where we prefer an abstract class with an abstract method. Please let me know, if this answers your question?

  • @kianaparsi8223
    @kianaparsi8223 10 лет назад +5

    thank you for these amazing video, they are really the best i have ever seen :)

  • @mysterious_____
    @mysterious_____ 3 года назад

    Best tutorials on c# amazing content ❤️

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  12 лет назад +6

    At the moment, I am in London

  • @amriteshtiwary5693
    @amriteshtiwary5693 2 года назад

    I've had the best knowledge ever thanks 😊

  • @mohdotnet
    @mohdotnet 4 года назад

    I love venkats tutorials. Sir you explain amazing. If I was interviewing my first question to the candidate would be DO YOU KNOW VENKAT?

  • @uploaded6409
    @uploaded6409 3 года назад +1

    Hi kudvenkat sir, you are great loved you videos . I have a doubt, you have mentioned that if you dont wish to implement a method in inherted class you can mark the class as abstract but dont you think it contradicts the statement that abstracted classes are only used as base class, because if you mark inherited class as abstract than it becomes derived class.

  • @christianrodier3381
    @christianrodier3381 6 лет назад

    That was very useful. I was really confused about abstract class now I feel much better about them

  • @swathivepuri7797
    @swathivepuri7797 10 лет назад +11

    Hi sir
    I would really thank you for giving us these videos .These are very helpful to me.
    I did not understand Why we go for this abstract classes ???..Please help me
    Thank you soo much sir

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  10 лет назад +7

      Hi Swathi, Please check Part 3 in C# Interview Questions and Answers video series. I hope this video answers.
      Part 3 Why and when should we use an abstract class

    • @swathivepuri7797
      @swathivepuri7797 10 лет назад +2

      Thank you soo much for taking time to give me reply sir...It helps me a lot....

    • @jbhaskarv982
      @jbhaskarv982 10 лет назад +1

      Very Good Videos

    • @jbhaskarv982
      @jbhaskarv982 10 лет назад +1

      kudvenkat Nice Videos

    • @pmp_video_hub
      @pmp_video_hub 7 лет назад

      Still You are Confused In Abstract Classes??

  • @dineshchinnadurai8338
    @dineshchinnadurai8338 10 лет назад

    Thank you sir. Really nice video about explicit interface implementation... Its very interesting ha ha ha........

  • @oguzhanozhan
    @oguzhanozhan 11 лет назад

    Thank you so much Bro,,You are the best so far...I am praying for you....Thanks...

  • @aakashdhoundiyal2368
    @aakashdhoundiyal2368 11 лет назад

    Thanks Sir.Yes it helped me a lot.I am again really thankful to you,these tutorials has helped me a lot.Facing interviews with no difficulty.Thanks venkat sir.
    Regards

  • @JfhuTheJedi
    @JfhuTheJedi 8 лет назад

    This video was great!! :D I just read about abstract classes in a C# book that I have and i kind of understood it but after watching your video I now get it :D

  • @advitramesh778
    @advitramesh778 7 лет назад +1

    Nice Video Mr. Venkat.

  • @zainulabdin
    @zainulabdin 9 лет назад +1

    excellent and expertly covered. but at the slide u said that in next u will discuss where to use abstract class but i cant find that topic because next topic is about difference between abstract class and interface and also i cant find the intro of interface. plz guide.

  • @aakashdhoundiyal2368
    @aakashdhoundiyal2368 11 лет назад

    Hey venkat,First of all thanks alot,your videos has really boosted up my confidence,i m facing my interviews without any hesitation these days.Thanks again.I had faced a question in my recent interview,which was "why exactly we needed Abstract class when same thing can be done by having virtual keyword in base class and override keyword in derived class"?i m really struck here.Why abstract class?Do help me venkat sir will be thankful to you.
    Regards

  • @erichjk
    @erichjk 9 лет назад +1

    good lesson,if the audio be more clear,that will be perfect.

  • @alaamousa2052
    @alaamousa2052 11 лет назад

    the best teacher at all

  • @dgloria
    @dgloria 6 лет назад

    Can't wait till you get to the point where you explain what's the use of interfaces and abstract classes.

  • @gian-lucanardini9706
    @gian-lucanardini9706 9 лет назад

    You are such a good teacher like the best i know thank you so much for your support i have been watching your videos from the start and i know everything up to now thank you :D :D :P

  • @SuperMichielv
    @SuperMichielv 11 лет назад +1

    You can not create an object from an abstract class, but you can you use the static non abstract methods by calling classname.method() because there is implementation if the method itself is not abstract.

  • @n.arumugam438
    @n.arumugam438 11 лет назад

    Hi venkat your C# all videos are nice...good job..

  • @satyabudhani2703
    @satyabudhani2703 11 лет назад +1

    very useful videos. Thank you.

  • @gebreyowhanshailekiros386
    @gebreyowhanshailekiros386 6 лет назад

    Interesting Tutorial.

  • @abhinavkumar8271
    @abhinavkumar8271 8 лет назад

    Excellent...

  • @RickTurpinScuba
    @RickTurpinScuba 7 лет назад +1

    Nice!

  • @therunouschronicles5282
    @therunouschronicles5282 11 лет назад

    thanks a lot...ur videos are really helpful..

  • @9703095613
    @9703095613 11 лет назад

    really very nice ...

  • @piyasidey2117
    @piyasidey2117 6 лет назад

    Thank You very much Sir.

  • @neerajkanojiya8098
    @neerajkanojiya8098 10 лет назад

    Nice....

  • @tholaalw8647
    @tholaalw8647 10 лет назад +4

    hi kudvenkat
    Could you please make Java tutorials. Thanks

  • @dcan876
    @dcan876 10 лет назад

    Which mouse enhancer do u use tat creates a temp circle on click?

  • @waqarshaikh716
    @waqarshaikh716 4 года назад

    Why do we need to use "override" keyword in the method signature while implementing method of an Abstract Class although we didn't use "override" keyword while we were implementing method of an Interface?
    Please reply!

  • @hendesebilisim
    @hendesebilisim 7 лет назад +1

    Thank you Sir

  • @ashishmayekar4292
    @ashishmayekar4292 10 лет назад

    HI sir, You mentioned that we can write a non-abstract function in abstract class definition. But what is the use of it as we can not create object of Abstract class. means we can not use that function at all? and Thank you for detail explanation :-)

    • @pushkarsawant762
      @pushkarsawant762 9 лет назад

      Well you can use a static modifier for that non-abstract function. This way, you can call it from within another class.That's one use.
      Second, if you didn't want the sub-classes to inherit a function, it can be marked as non-abstract. Only all the abstract members must be implemented by the sub-classes.

  • @rajmishra6769
    @rajmishra6769 5 лет назад

    Please correct me if i am wrong, but abstract class has functionality of both abstract and interfaces.

  • @Gojam12
    @Gojam12 9 лет назад

    On my visual studio when I have my program like you do at 8:37 , it tells me my print method must be marked as abstract or it gives an error on the program class print method can you tell me why its VS 2015

  • @anhvuong2901
    @anhvuong2901 6 лет назад

    thank you very much

  • @ihx7
    @ihx7 5 лет назад

    i have a list of cards(abstract class) and i want to get the value of a property thats only in a subclass called fighter card how can i do that?

  • @keithkatane4854
    @keithkatane4854 3 года назад

    You have a gift.

  • @andrewwiggins9233
    @andrewwiggins9233 9 лет назад

    Thank you sir - you said that abstract classes are classes that use the "abstract" keyword. All well and good, but what is an abstract class?

    • @RicCrouch
      @RicCrouch 9 лет назад

      Andrew Wiggins An abstract is used as a base for other classes. It's a "template" for a class--almost like a "class" version of an "interface".

  • @jithinjohn3773
    @jithinjohn3773 8 лет назад

    You said an ab class can only be used as a base class... But earlier in the same video you said If u don't want 2 provide implementation 4 all ab members of an ab class then the class inheriting the ab class can be marked as 'abstract'. So this 2nd abstract class becomes a child class and contradicts with your statement right? Please reply.

    • @kanagaharish
      @kanagaharish 8 лет назад

      Jithin John only abstract class cannot have implementation whereas he removed the abstract key word int the method and made the implementation so if he used abstract key word in the method he can not have implementation

    • @slobodantajisic2762
      @slobodantajisic2762 7 лет назад

      A parent or child class, abstract class only be used as a base class for other classes...

  • @mahipalkamanchi
    @mahipalkamanchi 8 лет назад

    sir is it possible inherit sealed class?
    I heard that we can inherit sealed class by using extension method. i researched in web i didnt got proper answer pl can u help me with an example...!

  • @hugh674
    @hugh674 4 года назад

    I learn from the first video to part32 this one rn now, they are good and ez to understand, but I have no idea what can I do ......

  • @sathishkomakul
    @sathishkomakul 3 года назад

    Where can abstract class used in realtime projects, and what is difference between encapsulation and abstraction with an example is is asked interview but I didn't get proper answer. Please if possible provide answer. Thank you.

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  3 года назад

      Hey Satish - Please checkout the following video, which explains when to use an abstract class in real world.
      ruclips.net/video/yyU3bXyc_oU/видео.html&index=4
      The following video can help, if you want to become a full stack web developer
      ruclips.net/video/RiKcSDbGVXw/видео.html

  • @ramkirankotipalli9072
    @ramkirankotipalli9072 9 лет назад

    This abstract classes will supports the concepts of multiple inheritance(i.e) child class :base1 class,base2 class .like interface

  • @anupshrestha3163
    @anupshrestha3163 6 лет назад

    If an abstract class can only be used as base class then why the derived class marked as abstract if class does not wish to provide implementation.

  • @qwertyguy76
    @qwertyguy76 11 лет назад

    Thank you soo much

  • @shivamjyoti907
    @shivamjyoti907 4 года назад

    You said a class cannot be sealed and abstract at the same time. But static class in c# is internally sealed and abstarct. It creates confusion . Kindly clearify.

  • @temelreis381
    @temelreis381 8 лет назад +2

    isnt he contradicting whats written on the video at 9.24... I'm confused :(

    • @sainathk5719
      @sainathk5719 7 лет назад +2

      Temel .. yes , if audience had observed.. he meant to say abstract instead of Non-Abstract!

  • @anyzzas7149
    @anyzzas7149 6 лет назад

    Also an abstract method cannot be hidden whereas interface method can.

  • @jbhaskarv982
    @jbhaskarv982 10 лет назад

    this is good videos

  • @MrKoceto
    @MrKoceto 11 лет назад

    Thank you

  • @ranweerkumar180
    @ranweerkumar180 6 лет назад

    sir, how to achieve abstraction and encapsulation in c#.i know show only necessary details to user is called abstraction and hide unnecessary details is called encapsulation. but how to achieve by programming..

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  6 лет назад

      This is great question Ranweer. We use properties and methods to achieve encapsulation. The concept of Abstraction is a bit more abstract. For example, in a real world when we think about an employee of a company, there are many things to consider, like first name, last name, date of birth, gender, city of birth, country, department, experience, skills, married, graduate or post graduate, etc.....Are all these relevant to the application that you are developing. Include only those properties in your class design that are relevant to your application. This is abstraction. I will try to record and upload a video very soon on both these concepts. Hope this helps.

    • @ranweerkumar180
      @ranweerkumar180 6 лет назад

      Thank u sir for your guidance.Please upload video for more clarification.

  • @nammozhi819
    @nammozhi819 2 года назад

    A mandatory interview question

  • @bhaveshgujarathi926
    @bhaveshgujarathi926 7 лет назад

    What is the difference bet J2SE and C#?

  • @abhinavsonakpuriya2707
    @abhinavsonakpuriya2707 6 лет назад

    sir can u provide ur lec for other sub also ??

  • @sudeepsingh8114
    @sudeepsingh8114 7 лет назад

    using System;
    namespace AbstractExample
    {
    //Using abstract keyword to declare abstract class.
    //Abstract class cannot be Sealed but can be used as public,protected etc.
    //Abstract class need to base class.
    //Abstract class is incomplete class that mean you cannot instantiate class and its member.
    public abstract class Customer
    {
    //Method declare inside abstract class can be defined as abstract or without
    //If it is abstract then its body should not be defined inside abstract class if do we will get error.
    //Abstract Method- cannot declare body of this method
    public abstract void Print();
    //Non Abstract method- Body need to be declared
    public void Paste()
    {
    Console.WriteLine("Paste method is called");
    }
    }
    //Program class is Non-abstract
    //If the program class is inheriting from abstract class then it have two options
    //a) We can declare the class abstract i.e Program class to be declared as abstract
    //b) Implementation of the abstract method in our case print()
    public class Program : Customer
    {
    // Use override keyword for implementing print method
    // We must have to use Print method since it is in abstract.
    public override void Print()
    {
    Console.WriteLine("Print method is called");
    }
    public static void Main(string[] args)
    {
    Customer C = new Program();
    C.Print();
    C.Paste();
    //Program P = new Program();
    //P.Print();
    //P.Paste();
    }
    }
    }

  • @abhinavlohani416
    @abhinavlohani416 3 года назад

    Since we cannot instantiate Abstract class then, how can we access non abstract members present inside Abstract class?

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  3 года назад +1

      Good question Abhinav - Abstract class by definition can only be used as a base (parent) class. This means an abstract class reference variable can still point to derived class instances and through this we will be able to invoke both abstract and non-abstract members. Hope this answers your question. Great question. Thank you for asking.

    • @abhinavlohani416
      @abhinavlohani416 3 года назад

      @@Csharp-video-tutorialsBlogspot Many thanks for clearing my doubt. I'm following your blogs since 2012 and it has helped me a lot in my career.

  • @099watcher
    @099watcher 12 лет назад

    Do you live in india?

  • @treasure2387
    @treasure2387 11 лет назад

    An abstract function does not have a body
    An abstract class can not be instantiated
    An abstract class can only be used as a Base Class(Inheritance)
    The child class has to provide the implementation for all the abstract members, otherwise you get an error.
    To provide the implementation in the child class you have to use the keyword: !! override !!
    If the child class is also abstract it doesnt have to implement the abstract members of the Base Class.

  • @adarsh65kumar
    @adarsh65kumar Год назад

    I understand what interfaces and abstract classes are now ( they seem pretty similar so far, but the next video is on the difference between the two., so I'll probably get my answers there).. but, what is their use.. so far it only seems like you're writing some extra lines of code for no good reason!

  • @mahendrayadav2281
    @mahendrayadav2281 8 лет назад

    why abstract class can't be initialized

    • @prodiptamondal1758
      @prodiptamondal1758 3 года назад

      What this video of venkat's : ruclips.net/video/yyU3bXyc_oU/видео.html

  • @treasure2387
    @treasure2387 11 лет назад

    ChildClass C = new ChildClass()
    C.callMethodVirtual();
    or BaseClass B = new ChildClass();
    B.callMethodVirtual();
    But this can not be done
    BaseClass B = new BaseClass();
    B.callMethodVirtual();
    A sealed member can only be used in the Base class, can not be used in the Derived class.
    So an abstract sealed member is impossible.
    IF a class contains non-abstract variables and functions it can NOT be instantiated, it still has to be inherited by another class(I hate ABSTRACT)

  • @mahendrayadav2281
    @mahendrayadav2281 8 лет назад

    can anyone tell me in detail why abstract class can't be initialized???

    • @SamuelFoster666
      @SamuelFoster666 7 лет назад

      You typically use an abstract class when you have some set of common
      functionality to be shared between derived classes. That is, you cannot
      use an interface because you want to provide some default functionality

    • @felicitysmoak1860
      @felicitysmoak1860 7 лет назад

      because abstract class composed of incomplete method meaning no implementation so it does not make sense if you instantiate abstract class.

  • @saurabhtagde3719
    @saurabhtagde3719 3 года назад

    Worst sound quality videos

  • @delfiromesaint
    @delfiromesaint 5 лет назад

    Thank you sir