Hiten,
See my comments inline
abstract class AC
{
public virtual Void VM()
{
console.writeline("I am Virtual");
}
public abstract void AM();
}
class testit : AC{
public override void VM()
{
console.writeline("I override it");
}
public override void AM()
{
console.writeline("I override Absyract");
}}
as we know we cannot initialise abstract class than how do i call
abstract mathod of abstract class AC?
Probably by initialize you mean instantiate. Yes you cannot instantiate an
abstract class because it is partially implemneted.
The abstract methods of an abstract class is used to porvide an interface.
Similar to the real interfaces with the difference that the abstract classes
can also provide implenetation for some of their methods and properties as
well as can have data fields. Because of this difference one class can
inherit/implement only one abstract class, but to implement from as many
interfaces as it needs.
So, you use the same way abstract classes as you would use an interface. As
an example
void Foo(AC ac)
{
ac.AM();
}
....
testit = t = new testit(); // AC is abstract, thus cannot be instantiated