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...

what is the use of final method

Answer Posted / sudhir sheoran

First of all sealed in c# is equivalent to final in java.

Sealed is used to stop further overriding an abstract method.

E.g:

public abstract class A
{
public abstract void print();
}

public class B:A
{
public sealed override void print()
{
Console.WriteLine("First override");
}
}

public class C:B
{
public override void print() //This will give compilation error.
{
Console.WriteLine("Second override");
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the new enhancements done in default project template of asp.net mvc 4?

992


What are Model Binders in ASP.Net MVC?

1185


Can you set the unlimited length for "maxjsonlength" property in config?

924


what is use of entity container?

996


What is entity graph? : Entity framework

927


Where is tempdata stored?

918


What is viewbag title?

900


Where are the routing rules defined in an asp.net mvc application?

986


Is .net framework backwards compatible?

1015


Does windows 10 need .net framework?

947


What is managed extensibility framework?

942


What is disconnected scenario? : Entity framework

1011


What is the use of display modes?

990


What is Attribute Routing in ASP.Net MVC?

1055


What is object service? : Entity framework

1117