How can one prevent the class from being inherited by another class using c#?
It’s simple, mark the class as “sealed”.
How to prevent the class from being inherited in C#?
sealed public class BaseClass { public string MovieName { get; set; } }
How can one prevent the class from being inherited by another class using c#?
It’s simple, mark the class as “sealed”.
sealed public class BaseClass { public string MovieName { get; set; } }
Leave a Reply