Out Parameters C# with Example



Out Parameters C# with Example

 using System;

namespace CSharpFundamentals
{
    class OutParameters
    {
        private static void Main(string[] args)
        {
			int outParamter;
			Addition(10, 20, out outParamter);
            Console.WriteLine("Addition of 10+20 = {0}", outParamter);
        }

        static void Addition(int x, int y, out int value)
        {
            value = x+y;
        }
    }
}
 

0 Comment's

Comment Form

Submit Comment