Difference between Call by value and Call by Reference

Описание к видео Difference between Call by value and Call by Reference

in this video we will learn :
1-what is call by value function in c#
2-what is call by reference in c#
---------------------------------------------------------------------
C# Call By Value:
In C#, value-type parameters are that pass a copy of original value to the function rather than reference. It does not modify the original value. A change made in passed value does not alter the actual value.

C# Call By Reference:
C# provides a ref keyword to pass argument as reference-type. It passes reference of arguments to the function rather than copy of original value. The changes in passed values are permanent and modify the original variable value.
------------------------------------------------------------------------------
code link:
http://learnfromsalman.blogspot.com/2...

Комментарии

Информация по комментариям в разработке