Identifying the Run-Time and the Design Mode(dotnetfacts.blogspot.com)
submitted by
eugenciuta(715) 3 years, 4 months ago
Some logic (like connecting to a database) is not meant to be called when the application is in design mode. Opening a Form, or a UserControl, in the Visual Studio Designer (or other IDE design module), which is trying to connect to a database in its constructor or in its Load or Shown event handler will end up with a Designer exception. Handling a database connection is a run-time job only! This situation may be avoided if the run-time specific code is properly handled.
|category: Tips & Tricks
|Views: 111
tags:
Workaround mode run-time Design C# another
Everyones tags:
Your Tags: