ICaramba

Miguel Castro's blog about .NET and its effect on National Security, the Eco-system, and his daughter's sleeping patterns.


News

My Stats

  • Posts - 120
  • Comments - 69
  • Trackbacks - 145

Twitter












Recent Comments


Recent Posts


Archives


Image Galleries



Blogs I read


Links


Microsoft DCCs


September 2006 Entries

Testing for running in Visual Studio


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

 

posted @ Thursday, September 07, 2006 12:45 PM | Feedback (2) |