childclass obj=new childclass;
absparent p=obj;
p.test1();p.test2();p.test3();
where test1 and test 2 are methods of abstract class
while test 3 are methods of child class
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted May 2, 2014, 5:48 AM
Munesh SharmaPosted May 2, 2014, 5:36 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication13
{
abstract class mcn
{
public int add(int a, int b)
{
return (a + b);
}
}
class mcn1 : mcn
{
public int mul(int a, int b)
{
return a * b;
}
}
class test
{
static void Main(string[] args)
{
mcn1 ob = new mcn1();
int result = ob.add(5, 10);
Console.WriteLine("the result is {0}", result);
}
}
}