Okay thanks. And yeah my current program seems to be very heavy on events and subscribers. Coming from C++ this seems a little weird because you dont control the exact flow but at the same time it feels nice because you dont have to care. The main reason for asking my original question was the thought that 4 public static properties would take 4 lines of code, followed by if(CApp.Settings.Setting1)
do this()
in any class that needs it, where as with the events its like I have a bool in each class that is Setting1 (true or false) and I have a subscribing method that sets this individual method to true or false whenever the event fires, and then i do
if(CApp.Settings.Setting1)
do this()
Because I have a loop that happens in all my classes nonstop while the program is running, and what settings are on or off changes what happens in those loops, its not a one time done deal, they all would need their own "is setting1 on or off right now" during the loops.
So im kinda wondering if there is a cutoff line where the gain from events is outweighed by the limited amount of data or results that those events trigger (i.e setting one bool in the opposite status). I mean I made a Timer class that sends events to any subscribers when that timer has expired and I love it dont get me wrong events are cool but, wondering if public static properties are sometimes okay or if its always frowned upon.
Quote:
Originally Posted by tyler_cracker
i don't understand why you would need to do this. can you give an example?
I dont need it, I just thought it would be cool =P