I was wondering if I could pass a List of types as generic parameter.
I have a class which needs to get indefinite number of types and work with them.
something like this:
class o<TTypeCollection>
{
private void someMethod()
{
repository.Save < TTypeCollection.First() > (MyCollectionViewSource.CurrentItem as TTypeCollection.First());
}
}
There is no way to do template meta-programming in C# the C++ style, but you can do it using reflection: