This is a snippet from my App.config :
system.diagnostics
switches
add name="Logowanie" value="Verbose"
/switches
/system.diagnostics
How can I make TraceSwitch in my C# code that will be connected with this one "Logowanie" from App.config? I want in my code to be able to write something like :
if (myTraceSwitch.TraceVerbose)
{
....
}
To be honest I made one just with :
TraceSwitch myTraceSwitch = new TraceSwitch("Logowanie", "This is my switch");
as you can see, just with the same name like in App.config but I think it doesnt work :/