How inheritance works in .net?



How inheritance works in .net?..

Answer / Nishant Pratap Singh

"Inheritance is a mechanism in which one class acquires the properties and behaviors of another. In .NET, a derived class inherits from a base class by using the keyword ':`nExample: npublic class BaseClass {n// Properties and methods...n}npublic class DerivedClass : BaseClass {n// Override properties and methods or add new ones...n}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Can you write a class without specifying namespace?

1 Answers  


Can "this" be used within a static method?

1 Answers  


Where?s Windows service database located?

2 Answers  


What is garbage collection and how it works. Provide a code example of how you can enforce garbage collection in .net?

1 Answers  


Explain .NET architecture?

1 Answers   TCS,


Please explain what is the difference between encrypting a password and applying a hashing?

1 Answers  


How ASP .NET different from ASP?

4 Answers  


Garbage collector thread is what kind of a thread?

1 Answers  


What is LINQ?

2 Answers   Ethos, MSP, TCS,


What are two different types of remote object creation mode in .net?

1 Answers  


What are the different types of memory in .net?

1 Answers  


What is Method Overriding? How to override a function in C#?

1 Answers  


Categories