using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication11
{
class Program
{
public void show()
{
System.Console.WriteLine("hello");
}
static void Main(string[] args)
{
meth ob=new meth();
ob.show();
}
}
}
Here we have two methods. One main method and another show method.
In main method we have created one object for the class and we have accessed the show method.
No comments:
Post a Comment