aaaaaaaaaaaaaaaaa
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public class Program
{ //if U write without 'public' then write it like
//'void fun()','void fun3()' and 'void fun2',it is Ur choice.
public void fun() //'fun' is function name.
{
Console.WriteLine("This is First Function");
}
public void fun3() //'fun3' is function name.
{
Console.WriteLine("This is 3rd Function");
}
public void fun2() //'fun2' is function name.
{
Console.WriteLine("This is 2nd Function");
}
static void Main(string[] args)
{ //'fun ,fun2 ,fun3 and p' is not key word U write any thing.
Program p = new Program(); //using 'p' as a
//object of class 'Program' for calling.
p.fun(); //with the help of 'p' calling 'fun' function.
p.fun2(); //with the help of 'p' calling 'fun2' function.
p.fun3(); //with the help of 'p' calling 'fun3' function.
Console.ReadKey();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
public class Program
{
static void Main(string[] args)
{ //'fun ,fun2 ,fun3 and p' is not key word U write any thing.
Program p = new Program(); //I using 'p' as a
//object of class 'Program' for calling.
p.fun(); //with the help of 'p' calling 'fun' function.
p.fun2(); //with the help of 'p' calling 'fun2' function.
p.fun3(); //with the help of 'p' calling 'fun3' function.
Console.ReadKey();
}
//if U write without 'public' then write it like
//'void fun()','void fun3()' and 'void fun2',it is Ur choice.
public void fun() //'fun' is function name.
{
Console.WriteLine("This is First Function");
}
public void fun3() //'fun3' is function name.
{
Console.WriteLine("This is 3rd Function");
}
public void fun2() //'fun2' is function name.
{
Console.WriteLine("This is 2nd Function");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
public class Program
{ //1st calling 'fun', second 'fun2' and 3rd 'fun3' function.
public void fun()
{
Console.WriteLine("This is First Function");
fun2(); //I calling 'fun2' function here.
}
public void fun3()
{
Console.WriteLine("This is 3rd Function");
}
public void fun2()
{
Console.WriteLine("This is 2nd Function");
fun3(); //I calling 'fun3' function here.
}
static void Main(string[] args)
{
Program p = new Program();
p.fun(); //I calling 'fun' function.
Console.ReadKey();
}
}
}