I need IsIDE function in C#

Posted on 2008-11-08
Last Modified: 2012-05-05
Hi experts!

I created WinForm application with C# 2008. Will be very helpful to create boolean function IsIDE which tell me when Im starting the program within  IDE, and when I start program from .exe file. Can somebody help ?
Question by:dvplayltd
    LVL 142

    Accepted Solution

    you can do with this line:
    if (Debugger.IsAttached = true) 

    Open in new window

    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    LVL 2

    Expert Comment

    check this...

    bool IsIDE = System.Diagnostics.Debugger.IsAttached;
    if (IsIDE)

    Open in new window


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now