mercredi 19 mai 2021

Get Property's Type Inside Getter for C#

Is there a way to get the property's type inside of a getter? Like with reflection or something?

public int Age {

    get 
    {
        var myType = {code to get property's type};
               
        //do stuff with myType
    }

}




Aucun commentaire:

Enregistrer un commentaire