C# Value vs Reference Types Explained

Поділитися
Вставка
  • Опубліковано 11 січ 2024
  • In this video, we explore the differences between value types and reference types in C#, and how they behave when copied or compared. Learn how variables are managed in C# and understand why unexpected outcomes can occur when working with variables. Gain a deeper understanding of value types, reference types, memory storage, and common scenarios where these concepts are relevant. Watch now to master the fundamentals of value types and reference types in C#.
    📝 Source Code on GitHub: github.com/MarkInman/ValueVsR...
  • Фільми й анімація

КОМЕНТАРІ • 31

  • @craig_the_dev
    @craig_the_dev 4 місяці тому +2

    @3:56 - Correct me if I am wrong but shouldn't your arrows now point to p2 place in the heap? Line 22, is saying p1 should now point to the place on the heap that p2 is pointing. Everything you said would apply if the code on line 22 was p2 = p1; Again please correct me if I am wrong - I'm not trying to troll I'm trying to better understand and make sure others do too. Thanks for the video, Mark

    • @Mark-D-Inman
      @Mark-D-Inman  4 місяці тому +1

      Yes, you're absolutely right Craig. That's a mistake in my slide, my bad :-(. You've understood it perfectly. My apologies for the confusion.

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

      @@Mark-D-Inman Oh no worries at all Mark! Your video made the small mistake much easier to see! Really this video is still top tier for an explanation. Still an awesome video! :)

  • @Sakach1
    @Sakach1 3 години тому

    So sad that discovered your channel this late, but this helps me learn a lot after tons of struggle. Definitely one of the most underrated coding channels I've ever saw keep it up!.

    • @Mark-D-Inman
      @Mark-D-Inman  53 хвилини тому

      That's great to hear :-) Thank you. I'm so glad to be able to help.

  • @stillnotchill2560
    @stillnotchill2560 Місяць тому

    this was very helpful in preparation for my interview, thanks!

    • @Mark-D-Inman
      @Mark-D-Inman  Місяць тому

      Glad it was helpful. Best of luck with your interview.

  • @developingwoot
    @developingwoot Місяць тому

    Really well explained! Looking forward to your next video.

  • @chizobaharmonyugwa9882
    @chizobaharmonyugwa9882 Місяць тому

    Well explained video, many thanks.

  • @0x8080
    @0x8080 10 днів тому

    Super helpful as a long-time engineer who needs to brush back up on C# again. I'm finding it's getting harder as I get older to keep up with stuff, maybe I gotta pick up coffee again 😅

    • @Mark-D-Inman
      @Mark-D-Inman  9 днів тому

      Glad to hear it :-) You should definitely pick up coffee again.

  • @itsashhuby6781
    @itsashhuby6781 4 місяці тому +2

    dont normally comment but this video was insanely helpful thanks !

    • @Mark-D-Inman
      @Mark-D-Inman  4 місяці тому

      Fantastic! So pleased I could help.

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

      Agreed! Finally found one that I could understand! Thanks Mark!

  • @alexandersjogren889
    @alexandersjogren889 25 днів тому

    Great explanation :) Thanks!

  • @Ak-zm3ce
    @Ak-zm3ce Місяць тому

    Great explanation keep it up

  • @mustafashahin88
    @mustafashahin88 3 місяці тому +1

    thank you a lot. it helped me.

    • @Mark-D-Inman
      @Mark-D-Inman  3 місяці тому

      Awesome. So pleased to hear it :-)

  • @dev_enca
    @dev_enca 2 дні тому

    Great explanation 💯

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

    thank you dude it helped !!!

  • @_Admin
    @_Admin 2 дні тому

    top tier

  • @user-dc5qn7hl8z
    @user-dc5qn7hl8z 27 днів тому

    great video

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

    Great Explanation! Can you add your source code's link to the video description? Thank you!

    • @Mark-D-Inman
      @Mark-D-Inman  5 місяців тому

      Thanks for the reminder to do this for the videos :-) Link is now in the description.

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

    Yeah! It Helped