Method

 using System;

using System.Collections.Generic;

using System.Net.Http;


namespace ConsoleApp2

{

   


    class Program

    {

       struct Student

        {

           public String name;

           public int age;

        };

        

   int a=12;

        enum Days { Sun, Mon, tue, Wed, thu, Fri, Sat };

       static  void Main(string[] args)

        {

            Program obj = new Program();

            obj.Test1();

            String name = "Computer";

            obj.Test2("sabir",12);//call

        }


        //1. Without return without parameter


        void Test1()

        {

           

            Console.WriteLine("1. Without return without parameter ="+a);

        }



        //1. Without return without parameter


        void Test2(String name,int age)

        {


            Console.WriteLine("1. Without return without parameter =" +name);

        }


    }

}


Comments

Popular posts from this blog

Method Function

Record