Je ne comprend pas quelque chose :
Ceci fonctionne très bien :
Mais ceci pas :new System.Diagnostics.StackFrame(2).GetMethod().DeclaringType.Name;
System.Diagnostics.StackFrame(2).GetMethod().Name
donnent respectivement 0 et null, c'est à dire qu'il ne trouve pas...new System.Diagnostics.StackFrame(2).GetFileLineNumber();
new System.Diagnostics.StackFrame(2).GetFileName();
Y a-t-il des conditions à remplir pour que ça fonctionne ? Je n'en ai pas trouvé sur le MSDN...
Partager