by
61 8
0
5
2,925
6
Top 1% !
Popular
Famous
Specified
Refined
Popularity: 4879th place
Created
Modified Sep 28, 2013
This snippet is Public
No tags for this snippet yet.
.NETFramework4.0
Architecturex86_64
Extension.cs
LanguageCSharp
LicenseMIT_X11
OSWindows

Generic way to declare log4net variable

This is a way to declare a static log4net variable that doesn't require the actual name of the current class to be typed, so it can be copy&pasted in each class you need!
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/11263/Generic-way-to-declare-log4net-variable?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus