Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TestClassOOP
- {
- class Program
- {
- sealed class Tiger
- {
- public void show()
- {
- Console.WriteLine("Sealed class !");
- }
- }
- class Dog:Tiger
- {
- // Error: can't derive from sealed type 'Tiger'
- }
- static void Main(string[] args)
- {
- Tiger tg = new Tiger();
- tg.show();
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement