You need to sign in to do that
Don't have an account?
SUMMIT THAKUR
Is there any way to set method return type like list<Class> and return different classes from this method?
class a{ class b{ int a; } class c{ string b; } static list<class> method(){ if(condition){ b obj=new b; return obj; } else{ c obj=new c; return obj; } } }
There is no way to add Class as List type.
Mark this as answer as best answer if it is solved & keep the community clean.