I want to create a generic method with two generic type parameters that parameters must be a List of objects or dictionaries but the C Sharp compiler won't allow that How can I achieve that scenario?
public class GenericTest
{
public void GenericMethod<TSucess, TFailed>(TSucess success, TFailed failure)
where TSucess : List<BatchResponseProperties>, Dictionary<string, string>, new()
where TFailed : List<BatchInput>, Dictionary<string, string>, new()
{
//Do something
}
}