Banner Ad

Tuesday, July 8, 2014

Daily Interview Question #12 : What is the purpose of “sealed” keyword in C#?.

By Francis   Posted at   6:31 PM   C# Interview Questions No comments
Sealed
1. When you want to prevent an class from being inherited by another class, you should use “sealed” keyword in front of the class.


2. You can use the sealed keyword with properties and methods also. In this case, you should use sealed keyword with “override”.
3. You cannot use “abstract” keyword with sealed modifier.

About Francis

Francis, an Associate at Cognizant. Having 7+ Years of experience in Microsoft web technologies.

0 comments :

Please give your valuable comments to improve the contents

Connect with Us