|
I thought the DesignMode would work but I was wrong.
I tested for “running in VS” by testing for:
if(System.Diagnostics.Debugger.IsAttached)
Stan Spotts just gave me this one:
public static readonly bool StartedFromVS = AppDomain.CurrentDomain.FriendlyName.EndsWith(".vshost.exe");
http://www.geekswithblogs.com/sspotts
|