.net - How do I override an generic method?(C#) -


I am creating a class named TetraQueue which is the system. Selection. Generic Q is overriding the class deq method, here is the code:

  public class tetraQue: qi < Tetrablock & gt; {Public override Tetrablock Dequeue () {return base.Dequeue (); }}  

But when I try to compile it I:

error TetraQueue.Dequeue () ': To override TetraQueue.cs No suitable method found

thanks in advance.

How do I know if any method is virtual (to avoid this kind of situation)?

Unfortunately the Dequeue method is not virtual, so you can not override it .


Comments