mercredi 6 février 2019

Get full name of parameter (namespace, class, method and name) c#

How would I get the namespace, class, method and name of a parameter or variable. For example:

namespace TheNamespace
{
    class Theclass
    {
        void Thing()
        {
            string thevariable = "";
            string b = thevariable.GetFullName();
            // b would be equal to TheNamespace.Theclass.Thing.thevariable
        }
    }

}

How would I do this





Aucun commentaire:

Enregistrer un commentaire