Ref vs Out
Difference between a Ref and Out variable?
Ref and Out both signifies that value is to passed as a reference with major difference that out needs to be initialized with in the scope of the method other wise program will not be able to compile.
In order to make this able to compile we will have to assign num1 with value with in scope of OutExampleAdd10 method.
Conclusion
Once you compile it you will notice:
Comments
Post a Comment