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



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

Answer / 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

More Dot Net AllOther Interview Questions

How do I write to the application configuration file at runtime?

1 Answers  


What is biginteger and when would you use that?

1 Answers  


Explain about the base class library provided by microsoft.net?

1 Answers  


Explain different pipelining hazards and how are they eliminated? : .NET Architecture

1 Answers  


What is Ienumerable

1 Answers  


What does this do? Gacutil /l | find /i "corillian"

1 Answers  


what is meant by language interoperability and language integration?

1 Answers   Six Sigma,


what is stage management ? (ASP.NET)

5 Answers   Ness Technologies,


can aspx page have multi language declarations ?

1 Answers  


What is the difference between an event and a delegate?

1 Answers  


Please tell me the .net 2.5 frame work with example

2 Answers  


What is boxing and unboxing? Does it occure automaatically or you need to write code to box and unbox?

1 Answers  


Categories