What does the ref keyword actually do in C#?

Published: 30 July 2021
on channel: Nick Chapsas
27,996
1.1k

Become a Patreon and get source code access:   / nickchapsas  
Check out my courses: https://dometrain.com

Hello everybody I'm Nick and in this video I am going to explain to you exactly what the ref keyword does in C#. I will explain this in the context of parameter passing because it is where you will most commonly encounter it but I will also talk about ref structs and how you can use it there to prevent something from being allocated in a place where it shouldn't.

Timestamps
How method parameters are passed? - 0:00
What is ref struct? - 8:12
ref locals, ref in methods, return ref??? - 9:31

Don't forget to comment, like and subscribe :)

Social Media:
Follow me on GitHub: http://bit.ly/ChapsasGitHub
Follow me on Twitter: http://bit.ly/ChapsasTwitter
Connect on LinkedIn: http://bit.ly/ChapsasLinkedIn

Keep coding merch: https://keepcoding.shop

#csharp #dotnet #ref


Watch video What does the ref keyword actually do in C#? online without registration, duration hours minute second in high quality. This video was added by user Nick Chapsas 30 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 27,996 once and liked it 1.1 thousand people.