C# functions with out variable

tutorial and example
tutorial and example

In C#, the out variable can be used like a reference variable. We don’t need to initialize the variable before passing it into a function call as a out-type. Using out is recommended if you want the function to return multiple modified values.

Let’s see a simple example which is using out variable.

Output