jeudi 20 octobre 2016

T Somemethod

Basically I want to restrict T to byte[] or to string in my generic method. I am stuck here as generics constraints cant be put on primitive types and sealed class.

I thought of having String in place of string and Stream in place byte[] even that didn't help.




Aucun commentaire:

Enregistrer un commentaire