Method Parameters Formal Value C# with Example



Method Parameters Formal Value C# with Example

 using System;

namespace CSharpFundamentals
{
    class MethodParametersFormalValue
    {
        private static void Main(string[] args)
        {
            int value = 100;

            Console.WriteLine("Before Method Execution, value={0}", value);

            ChangeParameters(value);

            Console.WriteLine("After Method Execution, value={0}", value);
        }

        static void ChangeParameters(int value)
        {
            value = 200;
        }
    }
}
 

0 Comment's

Comment Form

Submit Comment