c# program

Saturday, February 19, 2011

class program
{
static void Main(string[] arg)
{
numberteller obj = new number teller();
}
console.Writeline(obj.tellCons());
Console.ReadLine();
}

class numberteller
{
string WhicConscalled;
public numberteller()
{
WhicConscalled= "null constuctor called";
}
public numberteller (int a)
{
WhicConscalled = "int constructor called";
}
public numberteller(double a)
{
WhicConscalled = "double constructor called";
}
public string tellcons()
{
return WhicConscalled;
}

0 comments: