Making it happen
C# Generics
I found a very nice feature of generics in C# 2.0: you can enforce the template type to be a class and also to be derived from another class / interface:
public abstract class VRCollectionNode
So using the “where” keyword you can add contraints to the T type (here: to be derived from VRNode).
| Print article | This entry was posted by andrei on October 20, 2005 at 11:40 am, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
