C# Value vs Reference Types Explained

ΠŸΠΎΠ΄Π΅Π»ΠΈΡ‚ΡŒΡΡ
HTML-ΠΊΠΎΠ΄
  • ΠžΠΏΡƒΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½ΠΎ: 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...
  • КиноКино

ΠšΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΈ • 14

  • @craig_the_dev
    @craig_the_dev 2 мСсяца Π½Π°Π·Π°Π΄ +1

    @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  2 мСсяца Π½Π°Π·Π°Π΄ +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 2 мСсяца Π½Π°Π·Π°Π΄

      @@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! :)

  • @itsashhuby6781
    @itsashhuby6781 2 мСсяца Π½Π°Π·Π°Π΄ +2

    dont normally comment but this video was insanely helpful thanks !

    • @Mark-D-Inman
      @Mark-D-Inman  2 мСсяца Π½Π°Π·Π°Π΄

      Fantastic! So pleased I could help.

    • @mvsa
      @mvsa ΠœΠ΅ΡΡΡ† Π½Π°Π·Π°Π΄

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

  • @mustafashahin88
    @mustafashahin88 ΠœΠ΅ΡΡΡ† Π½Π°Π·Π°Π΄ +1

    thank you a lot. it helped me.

    • @Mark-D-Inman
      @Mark-D-Inman  ΠœΠ΅ΡΡΡ† Π½Π°Π·Π°Π΄

      Awesome. So pleased to hear it :-)

  • @leuelermias9893
    @leuelermias9893 4 мСсяца Π½Π°Π·Π°Π΄

    thank you dude it helped !!!

    • @Mark-D-Inman
      @Mark-D-Inman  4 мСсяца Π½Π°Π·Π°Π΄

      So glad to hear it πŸ˜€

  • @emreduman225
    @emreduman225 4 мСсяца Π½Π°Π·Π°Π΄

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

    • @Mark-D-Inman
      @Mark-D-Inman  4 мСсяца Π½Π°Π·Π°Π΄

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

  • @vikneshar139
    @vikneshar139 ΠœΠ΅ΡΡΡ† Π½Π°Π·Π°Π΄

    Yeah! It Helped

    • @Mark-D-Inman
      @Mark-D-Inman  ΠœΠ΅ΡΡΡ† Π½Π°Π·Π°Π΄

      I'm so pleased :-)