Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can i have abstract class with no abstract methods?

Answer Posted / priyank

Yes we can have an abstract class without abstract method
in c#.net.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Abstractdemo
{
abstract class A
{
public void Data()
{
Console.WriteLine("this is data");
}
}

class B : A
{
public void Data1()
{
Console.WriteLine("this is B");
}
}
class Program
{
static void Main(string[] args)
{
B b1 = new B();
b1.Data();
}
}
}
FYI

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java full form?

951


What happens when you add a double value to a string?

932


Can an unreferenced object be referenced again?

1134


Name some classes present in java.util.regex package.

979


What is the use of coding?

910


Is java jre still free?

904


How to perform linear search in java?

897


Explain a few methods of overloading best practices in java?

918


What's the base class in java from which all classes are derived?

1208


Why pointers are not used in java?

1044


How many types of threads are there in java?

992


Differences between traditional programming language and object oriented programming language?

1059


Explain 5 io best practices?

976


Do extraneous variables affect validity?

868


What is a lock or purpose of locks in java?

971