understanding c# classes and generics