What does the ref keyword actually do in C#?

What does the ref keyword actually do in C#?

30.079 Lượt nghe
What does the ref keyword actually do in C#?
Become a Patreon and get source code access: https://www.patreon.com/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