Error!
Success!

Identifying the Run-Time and the Design Mode

0
kicks

Identifying the Run-Time and the Design Mode  (Unpublished)

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.


Kicked By:
Drop Kicked By: