Following-on from this question, is it possible to detect whether one is in design or runtime mode from within an object's constructor?
I realise that this may not be possible, and that I'll have to change what I want, but for now I'm interested in this specific question.
You can use the LicenceUsageMode enumeration in the System.ComponentModel
namespace:
bool designMode = (LicenseManager.UsageMode == LicenseUsageMode.Designtime);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With