using System.Collections.Generic;
public abstract class AbstractClass {
public class SomeClass : AbstractClass{
public class YetSomeOtherObject {
public void ProblematicMethod<T>(AbstractClass obj){
public struct SomeStruct {
public AbstractClass obj;
public SomeStruct(AbstractClass obj){
public static void Main()
YetSomeOtherObject objectWithImportantCall = new YetSomeOtherObject();
List<SomeStruct> list = new List<SomeStruct>();
list.Add(new SomeStruct(new SomeClass()));
foreach(SomeStruct thing in list){
objectWithImportantCall.ProblematicMethod<type>(thing.obj);