Sunday, April 17, 2005

C# Method Call



using System;

namespace VirtualTest
{

public class a
{
public string a1()
{
return "base a1";
}

public string a2()
{
return "a2" ;
}

public string a3()
{
return "a3" ;
}

}

public class b : a
{


public string b1()
{
return "b1" ;
}

public string b2()
{
return "b2" ;
}

public string b3()
{
return "b3" ;
}


}
public class main
{
public static void Main()
{
a obja = new b();
string hi = obja.??????;
}


}


}


What are all the methods you can call for obja.

Ans : Base class method a1,a2,a3

No comments: