Posted By

sureshdasari on 10/08/18


Tagged

visual Studio c# dotent


Versions (?)

C# Sealed Keyword Example


 / Published in: C#
 

URL: https://www.tutlane.com/tutorial/csharp/csharp-sealed-keyword

Genrally, in c# sealed keyword is used to stop inheriting the particular class from other classes

  1. sealed class Test
  2.  
  3. {
  4.  
  5. public string Name;
  6.  
  7. public string Location;
  8.  
  9. }
  10.  
  11. public sealed class Test1
  12.  
  13. {
  14.  
  15. public int Age;
  16.  
  17. }
  18.  
  19. sealed public class Test2
  20.  
  21. {
  22.  
  23. // Implementation
  24.  
  25. }

Report this snippet  

You need to login to post a comment.