C# Function Call

C# .Net Framework

Posted by indranil on Jan. 28, 2021, 11:14 p.m.

C# Function Creation

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hello
{
    class Program
    {
        static void Myfun(string name)
        {
            Console.WriteLine("Myfun() Function Working "+name);
        }
        static float Avg(int a, int b, int c)
        {
            float sum = (a + b + c) / 3;
            return sum;
        }
        static void Main(string[] args)
        {
            Console.WriteLine("WelCome To Method / Function");
            float myavg = Avg(57, 10, 59);
            Console.WriteLine(myavg);
            Console.ReadLine();

        }
    }
}

 

noimg Visit Link: digitalocean.com