Declaring Class Instances
/*
* C# Programmers Pocket Consultant
* Author: Gregory S. MacBeth
* Email: gmacbeth@comporium.net
* Create Date: June 27, 2003
* Last Modified Date:
*/
using System;
namespace Client.Chapter_5___Building_Your_Own_Classes
{
public class DeclaringClassInstances
{
static void Main(string[] args)
{
ClassInstantied MyClass = new ClassInstantied();
}
}
class ClassInstantied
{
public void Display()
{
Console.WriteLine("Hello World");
}
}
}
Related examples in the same category