I'm writing a C# application that analyzes stocks based on historic prices. I have an object that holds the data (historic prices). All the data is kept in this object - I only need one instance of it, and the data is used by many other objects throughout the app.
Given the above, wouldn't it be easier (and also a better design) to make this object static? Because the alternative is what I'm currently doing - passing around between objects tens of references to the same single instance.
The reason I'm still hesitant is that I know static
objects should be treated carefully and because I've read this answer. In my case, the object is not a simple utility object and it is not stateless. Data is being loaded into the object and changes it, but my thinking is that these changes still need to be shared across all other objects and I know I won't need to have two different instances of this data object.
What's your thinking as to the best approach in my case? Is there an alternative solution I didn't consider?