Saturday, 22 September 2018

Difference between Output (out) and Reference (ref) Parameter Modifier

1. Output parameters do not need to be initialized before they passed to the method.
The reason for this is that the method must assign output parameters before
exiting otherwise it will produce compile time error.
2. Reference parameters must be initialized before they are passed to the method.
The reason for this is that you are passing a reference to an existing variable. If you
don’t assign it to an initial value, that would be the equivalent of operating on an
unassigned local variable.

Happy Coding!!!

No comments:

Post a Comment

SQL Audits

1. sys.server_audits What it is: Lists all server-level audit objects . An audit is the top-level object that defines: Where to wri...