What are Partial Classes? - C# Programming for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ม.ค. 2025

ความคิดเห็น • 58

  • @CodeBeauty
    @CodeBeauty  2 หลายเดือนก่อน +2

    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10)

    • @Pythonx613bashuk
      @Pythonx613bashuk 2 หลายเดือนก่อน +2

      I have your promo code copied and ready to go. 👻 3:04

    • @nv9usb381
      @nv9usb381 2 หลายเดือนก่อน +1

      @@Pythonx613bashuk I joined about two months ago, and honestly, it's the best program. I started a few courses before but lost interest super quickly, learning usually makes me sleepy, hungry, and bored lol
      but I’ve been following Saldina's plan for the last two months, and I actually made a simple app to track my budget, it’s really cool, and I feel proud that I did it myself!
      I gotta be honest, my original goal was to study for two hours every day, but I usually study maybe three or four days a week, but I feel like I’m making great progress, especially since before I could never really apply what I learned, it felt like I was just wasting my time. Now I'm actually learning how to make stuff, and it's amazing, I really hope to be a great developer one day.

    • @nv9usb381
      @nv9usb381 2 หลายเดือนก่อน +1

      @@Pythonx613bashuk I joined about two months ago, and honestly, it's the best program. I started a few courses before but lost interest super quickly, learning usually makes me sleepy, hungry, and bored lol
      but I’ve been following Saldina's plan for the last two months, and I actually made a simple app to track my budget, it’s really cool, and I feel proud that I did it myself!
      I gotta be honest, my original goal was to study for two hours every day, but I usually study maybe three or four days a week, but I feel like I’m making great progress, especially since before I could never really apply what I learned, it felt like I was just wasting my time. Now I'm actually learning how to make stuff, and it's amazing, I really hope to be a great developer one day.

    • @ADevelopersJournal-s6c
      @ADevelopersJournal-s6c 2 หลายเดือนก่อน

      Thank you so much, I am learning a lot through your videos

  • @graytonw5238
    @graytonw5238 2 หลายเดือนก่อน +10

    For anybody wanting to learn C# and good principles of programming in general, THIS is the channel and online course. I'm 20% through Saldina's Practical Programming course, and between that course and her YT videos, I've already learned more C# than I have in other courses I've tried. No abstract separation of teaching concepts in isolation. Real-world application development with the concepts explained and applied as the application is being built. Great content! (And no, I'm not being sponsored or paid to say it 🙂)

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +4

      I really appreciate you taking the time to share your experience! Much love! ❤❤❤

  • @Pythonx613bashuk
    @Pythonx613bashuk 2 หลายเดือนก่อน +2

    You inspire us all 🙇‍♂️ . Gratitude 👑

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      Thank you very much! 🥰🥰🥰

  • @TheKeshav23
    @TheKeshav23 2 หลายเดือนก่อน +4

    Hello, I like your way of teaching even , I have used your example to code.

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +1

      That's awesome to hear! Glad you found it helpful.

  • @ikasugami8066
    @ikasugami8066 2 หลายเดือนก่อน +1

    A common example of the use of partial classes is in forms in a windows form application. The code generated by the designer pertaining to the GUI goes into a "designer.cs" file while the code for functionality driven by the GUI (button clicks, input validation, etc.) goes into the .cs file.

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +2

      Yes, exactly, that is a great example! 🥰🥰

  • @ronaldrussel1158
    @ronaldrussel1158 2 หลายเดือนก่อน +1

    Odlicna si, hvala, podrska za dalje☺️

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      Hvala, veliki pozdrav za tebe 🥰

  • @MrDonpasqualino
    @MrDonpasqualino 2 หลายเดือนก่อน +2

    Thank you for sharing knowledge

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      You're welcome! 😊

  • @douglascaskey7302
    @douglascaskey7302 2 หลายเดือนก่อน +2

    Partial... Readability. If you think having different code segments that make sense together in different files then I'd say you've probably broken the Single Responsibility principle.

    • @LimitedWard
      @LimitedWard 2 หลายเดือนก่อน

      Exactly. If your knee jerk reaction is to split the code into multiple files for readability then your class is doing too much work. Partial classes should not be used to improve readability.

  • @paarsaJam
    @paarsaJam 2 หลายเดือนก่อน +2

    ❤ Thank you so much. Wishing you the best.

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      Always a pleasure! 😊

    • @paarsaJam
      @paarsaJam 2 หลายเดือนก่อน

      ​@@CodeBeauty Pleasure's all mine. I wish I could pay for all of your courses to learn from you. The way of your teaching is greater than that of many teachers I've ever seen, making your students more confident in their ability to do their jobs, face problems, and understand how to solve them better. knowing that what your students need even before they want to ask to get better knowledge about the subject.
      I'm proud of you, Ma'am.​

  • @santiagozamora9601
    @santiagozamora9601 2 หลายเดือนก่อน

    Heyy. I work with julia and python for numerical optimization in statistics. Recently I have had the doubt on how to use chatgpt appropriately. What is your opinion on this? Is it gonna substitute us (us programmers) some day soon?

  • @hamudxd9497
    @hamudxd9497 หลายเดือนก่อน

    Top class❤

  • @ROYALNIL_SITE
    @ROYALNIL_SITE 2 หลายเดือนก่อน

    very good saldina

  • @KaramVeer-f6o
    @KaramVeer-f6o 2 หลายเดือนก่อน

    Great Explanation
    I love the way you were kidding randomly

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +1

      Thanks for the feedback! I try to make learning fun :D

  • @sohailkhan12319
    @sohailkhan12319 2 หลายเดือนก่อน

    Good ❤❤❤❤❤

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      ❤❤❤

  • @KC-p5m
    @KC-p5m 2 หลายเดือนก่อน

    Need a C programming course

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +2

      C++ is an improved form of C programming that includes support for object-oriented programming, and C# is a child of C++, so they're very very similar 😊

  • @Solidity_Ether_Code_UK
    @Solidity_Ether_Code_UK 2 หลายเดือนก่อน

    A got the coding bug. thanks 😊

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      You're welcome! ❤

  • @LimitedWard
    @LimitedWard 2 หลายเดือนก่อน

    Respectfully, I completely disagree with 2 of the 3 benefits you listed.
    With regard to organization, if your class is so large that you feel the need to logically split it into multiple files, then your class is doing too much work and should be divided into separate dependencies. Not only does that acheive the desired effect of organizing the code better, it also allows you to name those dependencies according to their usage while simultaneously improving testability. Using partial classes to organize code better is a code smell.
    With regards to collaboration, partial classes actively make it more difficult to collaborate by masking internal behavior of classes among multiple files. This makes it more difficult to understand what the code is actually doing, which not only impedes onboarding but also increases the risk of introducing regressions. The concern about producing merge conflicts is overblown given the widespread prevalence of VCS like Git, which simplifies the merge process.
    The only good example I've seen of partial classes is with autogenerated code, so I do agree with your third point. But I've seen so many repos with GIGANTIC partial classes split among dozens of files that it would make your head spin. Those same repos need to rely on hacky reflection tricks to make anything testable (assuming they have any code coverage in the first place).

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      Ideally, yes, I agree with you, classes should be small and focused on a single responsibility. However, in reality, many companies are running on legacy code that's often full of bugs. I’ve personally seen classes with over 10,000 lines of code-so large that even Visual Studio struggles to open them without lagging. We sometimes even need to use other tools just to view those files!
      In some cases, the code is so old and complex that no one dares to touch it. There might be countless undocumented features embedded in it, and the developers who originally knew the system well are long gone. But as long as clients are still paying and the application still works, there’s often no incentive to make changes. Attempting to refactor it could break functionality that no one knew existed. So, rather than risk breaking things, new code just gets layered on top of the old.
      In a perfect world, it would be wonderful if someone could clean up all these issues. Realistically, though, no one wants to tackle it unless absolutely necessary - it can be a brain-melting task.
      So for this use case partial classes are a bit like medicine: ideally, we’d have a cure for cancer, but right now, treatments like chemotherapy are the best option.
      For other benefits, partial classes allow developers to split large classes into smaller parts, making code more manageable without changing the overall structure. Partial classes also help with collaboration, as different developers can work on the same class in separate files without creating conflicts.
      I can see that you have strong critical thinking and logical reasoning skills - both of which are essential for developers! If you're interested in diving deeper into programming, working on real-world projects, and getting hands-on experience, I recommend checking out my practical programming course.
      While TH-cam videos are great for quick insights, they’re often too short to cover complex projects that fully demonstrate the power of programming. In the academy, you'll find a more comprehensive learning environment, with in-depth projects designed to build real skills. The academy is home to some of the most dedicated students, and they’re achieving impressive results.
      You can check it out and join us here: www.codebeautyacademy.com/

  • @LuigiZambetti
    @LuigiZambetti 2 หลายเดือนก่อน

    There is little point in putting partial classes in a single file, because this defeats the main purpose for which they were introduced.
    Partial classes were specifically designed to:
    - Separate code into different files for better organization
    - Allow automatic code generation while keeping it separate from manually written code
    - Facilitate teamwork on different parts of the same class
    If you put everything in a single file, you lose these benefits and just add unnecessary complexity.

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      thanks for the summary! That’s pretty much what I covered in the “benefits of using partial classes” section of the video.

    • @douglascaskey7302
      @douglascaskey7302 2 หลายเดือนก่อน

      Seem to me by breaking a class up into multipe files you increase the complexity, as now a dev has to understand and keep track of even more files. It decreases readability and maintainability of your code by a huge factor. Instead you should focus on decreasing the size of your class. Move out code to smaller more focused classes. Reduce code duplication.
      In the case of IDE generated UI code it makes sense that it is seperated from the base code.
      If you have to have a class broken up so multiple devs can work on different parts, then again IMO it would seem the class should be seperated into different classes the first place. Also that's what GIT forks and branches are for... to facilitate team work. It also means by allowing team members their own part of a class, if there's not a maintainer keeping a firm hand on a coherent code style, it can devolve into a mess to read.

  • @mukisajohnmary
    @mukisajohnmary 2 หลายเดือนก่อน

    ❤❤❤

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      ❤❤❤

  • @Edrissafi18
    @Edrissafi18 2 หลายเดือนก่อน

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      ❤❤❤

  • @Solidity_Ether_Code_UK
    @Solidity_Ether_Code_UK 2 หลายเดือนก่อน

    ❤🎉😊

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      ❤❤❤

  • @wilgarcia1
    @wilgarcia1 2 หลายเดือนก่อน

    😻😻😻😻😻😻

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน

      😻😻😻😻

  • @thrice5560
    @thrice5560 2 หลายเดือนก่อน +2

    Alright boys no weird comments.

    • @DionAhm
      @DionAhm 2 หลายเดือนก่อน

      Dude she had said in 1 of her videos which was 8 months ago the following: "you saw some nice titties & learned about data structures & algorithms, why are you complaining?" I'm not the one being weird when she admits it

    • @KC-p5m
      @KC-p5m 2 หลายเดือนก่อน

      You wish

    • @DionAhm
      @DionAhm 2 หลายเดือนก่อน +2

      ​@@KC-p5midk man... She seems to actually know stuff but the way she does it in some of her videos/thumbnails is just nah.... if you know what I'm saying

    • @graytonw5238
      @graytonw5238 2 หลายเดือนก่อน

      @@DionAhm If you watch her Q&A video you realize she's knows what she's doing and does a great mix of humor, trolling and education. 😄

    • @DionAhm
      @DionAhm 2 หลายเดือนก่อน

      ​@@graytonw5238no i haven't, when does she QNA?

  • @LuigiZambetti
    @LuigiZambetti 2 หลายเดือนก่อน

    $49 a month?! Is this a joke?

    • @CodeBeauty
      @CodeBeauty  2 หลายเดือนก่อน +1

      We offer a full refund policy if you feel the course isn’t worth your investment. I’m happy to provide this option because I genuinely believe the value far exceeds the cost - and so far, every student has felt the same way! It's risk-free to try it out and then say what you think :D

  • @badrelouariti5967
    @badrelouariti5967 2 หลายเดือนก่อน

    bellissima ragazza con un cervello ottimo :) magari le donne fossero tutte come lei veramente donna con qualita ottime di programazione

  • @azharalibhutto1209
    @azharalibhutto1209 2 หลายเดือนก่อน

    ❤❤❤