this question has answer here:
in android, if need name of current class, can like:
private final _tag = dummyactivity.this.getclass().getsimplename();
this return "dummyactivity"
i want same in c# wpf app code-behind. how name of current class?
this.gettype().name; //this works on instances of class
looks option hard-code in c# this:
private const string _tag = "dummywindow";
an instance "current", concept not make sense otherwise. if want name of known type typeof(class).name
.
Comments
Post a Comment