Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SomeSuspeciousAssembly
- {
- class SomeSuspeciousClass
- {
- //Some junk malicious code
- }
- }
- namespace ConsoleApplication1
- {
- abstract class MyBase<T> where T : MyBase<T>
- {
- public void MyMethod()
- {
- Console.WriteLine("MyMethod");
- }
- }
- class MyDerived : MyBase<MyDerived>
- {
- }
- class MyOtherDerived :
- MyBase<SomeSuspeciousAssembly.SomeSuspeciousClass>//Gives error. Should not be done.
- {
- }
- class Program
- {
- static void Main(string[] args)
- {
- MyBase<MyDerived> obj = new MyDerived();
- obj.MyMethod();
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement