Blog

Detect if Your app working on Visual Studio’s Environment or not

if (Debugger.IsAttached = true) { // Since there is a debugger attached, } else { // Assume we aren’t running from the IDE }

 

// C#

if (this.DesignMode() = true)

{       // The component is in design mode  }

else

{            // The component is in run mode }