Hello everyone.
I have two classes: Media and Container.
I have two lists List<Media>
and List<Container>
I'm passing these lists to another function (one at a time);
it can be one or another;
what's the proper way to check for the "template" type of the list so i can call an asssociated method depending on the list type?
or should i just try casting to the List<> and put Try/Catch blocks around it ?
Object tagObj = mediaFlow1.BackButton.Tag;
if (tagObj == Media)
//do this
else if (tagObj == Container)
//do this
else
throw new Exception("Not a recognized type");