Je ne comprend pas quelque chose :

Ceci fonctionne très bien :
new System.Diagnostics.StackFrame(2).GetMethod().DeclaringType.Name;
System.Diagnostics.StackFrame(2).GetMethod().Name
Mais ceci pas :
new System.Diagnostics.StackFrame(2).GetFileLineNumber();
new System.Diagnostics.StackFrame(2).GetFileName();
donnent respectivement 0 et null, c'est à dire qu'il ne trouve pas...

Y a-t-il des conditions à remplir pour que ça fonctionne ? Je n'en ai pas trouvé sur le MSDN...