adspace


Explain the use of virtual, sealed, override, and abstract.

Answer Posted / Lalit Kumar Yadav

"Virtual: A virtual method in C# can be overridden by a derived class. It allows for polymorphism.nnSealed: A sealed class cannot be inherited by any other class, and a sealed method cannot be overridden.nnOverride: When you override a method, you provide a new implementation of an existing method in a derived class.nnAbstract: An abstract class is a base class that cannot be instantiated. It contains abstract methods that must be implemented by any derived class."

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Different types of authentication modes in .net framework ?

1066


hi, kindly send WWF(.net 3.5) pdf notes to my id. thanx in advance, chays

2401


Explain element .net mobile with example? : Microsoft dot net mobile

1054


difference between Response.write,server.transfer and also which one is used when ?

1981


Why am I getting an invalidoperationexception when I serialize an arraylist?

971


How do I know when my thread pool work item has completed?

1001


How does an appdomain get created?

1029


I can't be bothered with cas. Can I turn it off?

1019