Mike Yearwood
Toronto, Ontario, Canada
Environment versions
Network:
Windows 2008 Server
>PMFJI....I think "most" of the time, PUBLIC/Global variables aren't necessary.
>
>But I'd stop short of saying 100% of the time.
>
>I don't think they were necessary in the example where Mike Y provided a nice clean solution - but instances where you have scalar values that need to be visible across the entire app are served by a global setting (e.g. Company Name, current user signed on, etc.) In most .NET apps I had a global class of properties for such values.
>
>Just my 2 cents
I advise people to assume/pretend that public variables are a bad idea 100% of the time, so they will find alternatives. Way too often they are the first solution and are abused by Rick's so-called experienced developers. What is experienced? Is a guy who sells a piece of software to hundreds of stores experienced? Not in my experience.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only