I have a class that defines a CallRate type. I need to add the ability to create multiple instances of my class by reading the data from a file.
I added a static method to my class CallRate that returns a List<CallRate>
. Is it ok for a class to generate new instances of itself by calling one of its own constructors? It works, I just wonder if it's the proper thing to do.
List<CallRates> cr = CallRates.ProcessCallsFile(file);
Air conditioners are at their top performance when they're running at full-blast, but you don't want your system to be doing its best work when no one is around to enjoy the refreshing coolness. Instead of turning the whole system off when you leave, set your thermostat to around 78 degrees.
Start by setting your thermostat higher than normal when you are away, and at 78 degrees when you are home. That is the Department of Energy's recommended setting when you need cooling, but want to save energy.
Your AC will actually run longer overall if it is left on all day instead of being shut off. If you turn it off for part of the day, it runs less and results in more energy savings for you. In almost all cases, it will save you money to shut off your AC while you are away from home.
If you want to feel good, as in comfortable, many people will want to lower their thermostat to the low 70s in summer. But if you're talking about saving money on energy and limiting your environmental impact, 70 degrees Fahrenheit is a very bad temperature for your AC to reach.
It is perfectly fine to get object(s) of its own from the static method.
e.g.
One of the dot net libraries does the same thing as you did,
XmlReadrer reader = XmlReader.Create(filepathString);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With