V
vidalsasoon
I have a class "SomeForm" that inherits a "Global" class which in turn
inherits "System.Windows.Forms.Form". As you may have guessed all my
other classes that are inheriting from "Global" are also picking up on
the "Form" fudge. Since I only have one form in my app, it bothers me
that "Global" is so obese.
I would like to clean this up a little.
I was thinking of setting "Global" as an interface but i'm not sure how
I could maintain the staticness of my class.
I know global variables are frowned on but if I had to pass my global
object along everywhere... it would suck.
I also thought of singleton for my global class but felt it would be
awkward to set variables with.
I'm still not all that comfortable with OO and could use some input.
any objections to my approach appreciated.
V.
inherits "System.Windows.Forms.Form". As you may have guessed all my
other classes that are inheriting from "Global" are also picking up on
the "Form" fudge. Since I only have one form in my app, it bothers me
that "Global" is so obese.
I would like to clean this up a little.
I was thinking of setting "Global" as an interface but i'm not sure how
I could maintain the staticness of my class.
I know global variables are frowned on but if I had to pass my global
object along everywhere... it would suck.
I also thought of singleton for my global class but felt it would be
awkward to set variables with.
I'm still not all that comfortable with OO and could use some input.
any objections to my approach appreciated.
V.