✅ out vs ref keyword usage
Hello guys, can someone explain when to use the out keyword and when to use the ref keyword please. I understand that in both scenarios, behind the scene, a pointer is passed so that any change made is reflected back. I also read that ref need to be initialized before passing value as argument while out doesn't but out need to be assigned a value inside the method itself.
I don't understand where one is used over the other though... can someone explain please, any use cases/best practices.
I don't understand where one is used over the other though... can someone explain please, any use cases/best practices.