mercredi 4 août 2021

Get Interface's tag in c# with reflection

Is there a way to get a number from 0 to X which indicates the tag of an interfae? Something like

typeof(MyInterface).GetTagOf(typeof(MyStruct)) -> 0
typeof(MyInterface).GetTagOf(typeof(MyStruct2)) -> 1

without having a field for that?

EDIT: there is no need to downvote my question, if you didn't understand it just ask me other informations etc..., this is a very toxic behaviour





Aucun commentaire:

Enregistrer un commentaire