C5 Generics Collection IntervalHeap<T> -- getting an IPriorityQueueHandle from a T for Replace or De

Posted by Jared Updike on Stack Overflow See other posts from Stack Overflow or by Jared Updike
Published on 2010-06-09T23:18:08Z Indexed on 2010/06/09 23:22 UTC
Read the original article Hit count: 209

Filed under:
|
|

I'm using the Generics Collection library C5 (server down :-( ) and I have an IntervalHeap(T) and I need to Delete or Replace a T that is not the Max or Min. How do I get an IPriorityQueueHandle from my T? The C5 library source code shows that IPriorityQueueHandle(T) has no methods or properties to implement and the compiler thinks my implementation of IPriorityQueueHandle(T) for my T is acceptable. I try to use a T like this:

q.Replace(t, t);

and the C5 library throws an InvalidCastException because it cannot convert my T to a (Handle).

© Stack Overflow or respective owner

Related posts about c#

Related posts about generics