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

Why we go for collections in java?

978


Why main() method is public, static and void in java ?

1096


How many bits is a char?

983


What is oops in java?

1020


What are JVM.JRE, J2EE, JNI?

1100


What is a list in java?

946


Which is faster set or list in java?

1032


Which package has light weight components in java programming?

1141


How do you write a good declaration?

982


What is command line used for?

1091


What is the equal sign?

1118


Differentiate between the constructors and methods in java?

944


What is java object name?

993


What is diamond operator in java?

950


When do we use synchronized blocks and advantages of using synchronized blocks?

1226