J
Juan Pedro Gonzalez
Helo,
My question is how can I exit an application from a class Library...
I've got a class library wich I use to load and save user setting for my
application, some of this settings are mandatory, therefore if the setting
is not present the application should exit. I know I could throw an
exception to the main program, or even return nothing, make a check wich
will close the application if its Nothing. But this means more code on the
program side, and I would like to relief the program code from this checks
passing them to the class library (after all the class was made in order to
realieve coding and coding errors in case you forgot a check).
I've tried passing the "application" 'class' to the class inside my class
library, but .NET will say it's a type and it can't be passed as a
parameter, therefore "application.exit" seems to be unaccesible from my
class library.
What could I do to close the application from the class library?
Thanks in advance,
Juan
My question is how can I exit an application from a class Library...
I've got a class library wich I use to load and save user setting for my
application, some of this settings are mandatory, therefore if the setting
is not present the application should exit. I know I could throw an
exception to the main program, or even return nothing, make a check wich
will close the application if its Nothing. But this means more code on the
program side, and I would like to relief the program code from this checks
passing them to the class library (after all the class was made in order to
realieve coding and coding errors in case you forgot a check).
I've tried passing the "application" 'class' to the class inside my class
library, but .NET will say it's a type and it can't be passed as a
parameter, therefore "application.exit" seems to be unaccesible from my
class library.
What could I do to close the application from the class library?
Thanks in advance,
Juan