Can you prevent your class from being inherited and becoming
a base class for some other classes?

Answer Posted / umesh

Yes, that?s what keyword sealed in the class definition is
for. The developer trying to derive from your class will get
a message: cannot inherit from Sealed class
WhateverBaseClassName. It?s the same concept as final class
in Java.

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give an example of a directcast.

592


List down the different ide’s provided by microsoft for c# development.

562


Is for loop faster than foreach?

614


Can a constructor be private in c#?

564


Hi Friends, I am going through Siemens Interview Procedure from last 1+1/2 months. I went through 1 written + 2 Technical + 1 Managerial Round process after which I got call from HR informing that "you are selected and we would like to meet you for HR round". HR round was very nominal compared to MR. HR Round last for hardly 5 mins. They told me that you will get the final result on Friday. Still I have not received any feedback from them. Please help!!!

16741






Can a string be null c#?

580


What is strong name assembly?

542


Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates

588


Define delay signing?

612


Is c# strongly typed?

551


What is namespace in oop?

586


What is ienumerable <> in c#?

550


Does the system.exception class have any cool features?

599


Can we change static variable value in c#?

569


What are native functions?

544