Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp3
- {
- class A { }
- class B : A { }
- class C : B { }
- class D : E { }
- class E : J { }
- class I { }
- class J : I{ }
- class Program
- {
- static void Main(string[] args)
- {
- B b = new B();
- A a = new A(), c = new C();
- I i = new I(), k = new D();
- J j = new E(), d = new D();
- Console.WriteLine(c is B); // t
- Console.WriteLine(i is J); // f
- Console.WriteLine(b is A); // t
- Console.WriteLine(d is A); // f
- Console.WriteLine(d is E); // t
- Console.WriteLine(k is E); // t
- Console.WriteLine(c is I); // f
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement