How do I find a trace listener (in code) that I declare in app.config?
See the question and my original answer on StackOverflowYou are defining a specific TraceSource. If you want to trace something in this case, this is how you would do like this:
TraceSource source = new TraceSource("RomanExampleWPFApp");
source.TraceInformation("hellow world");
And if you want to get a list of listeners, then you can do it like this:
TraceSource source = new TraceSource("RomanExampleWPFApp");
foreach (var listener in source.Listeners)
{
...
}