1

Possible Duplicate:
How to tell if .net app was compiled in DEBUG or RELEASE mode?

Simple Question; Is there an easy way to check whether a .NET 1.1 assembly is debug-compiled or not?

Community
  • 1
  • 1
ullmark
  • 2,469
  • 1
  • 19
  • 28

1 Answers1

0

It depends on how you want to check. If you want to check in code when you are actually running, if the code is in debug mode, you can use:

Debug.Assert(MyFunction())

Using that code, MyFunction will only run when the dll it is located in is compiled in debug mode.

Kibbee
  • 65,369
  • 27
  • 142
  • 182