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

Which are the important namespaces used in ASP.Net MVC?

1093


What are the Core features of ASP.NET MVC?

1068


Describe the .net framework architecture.

1070


In .net compact framework, can we free memory explicitly without waiting for garbage collector to free the memory?

1083


What is the difference between model view and controller?

951


what is use of entitydatasource control?

1098


What is Layout in ASP.Net MVC?

1079


Mention two instances where routing is not implemented or required?

1226


will there be any issues adding a table without primary keys to a data model?

1103


What are HTML Helpers, AJAX Helpers in ASP.Net MVC?

1049


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

1013


what is entity framework?

1086


How can we determine action invoked from HTTP GET or HTTP POST?

1030


What is the difference between viewbag and viewdata in mvc?

967


how do you truncate a table using entity data model?

1182