Showing posts with label SIMPLE PROGRAM USING CLASS OBJECT METHOD. Show all posts
Showing posts with label SIMPLE PROGRAM USING CLASS OBJECT METHOD. Show all posts

Saturday, November 7, 2009

SIMPLE PROGRAM USING CLASS OBJECT METHOD

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.