tisdag 2 oktober 2012

Detect if debugger is attached - C#

Here is another small snippet, hopefully you will find it usefully.
The usage off detecting if debugger it attached i can thing about right now.
Would to prevent people from attaching a debugger will program is running etc a payed program.


We check if  Debugger.IsAttached with a if-statement, if it's true we print "Debugger  Attached" else
it will print "Debugger is not Attached".



Read about the  System.Diagnostics.Debugger  Msdn: http://msdn.microsoft.com/en-us/library/System.Diagnostics.Debugger.aspx
Another time another snippet : )

Pastebin (Source) http://adf.ly/DMbuk

Inga kommentarer:

Skicka en kommentar