Tag Selected: how to use generics in c#