We are running a program in a loop on an enterprise scheduler throughout the day. The scheduler needs an integer return value, so we have to write the program to naturally return this. However, we want to keep a running tally of some information so I need to somehow pass in a collection object, retain it's values, add the new counts to the object, and then pass the new totals back to the program that called it.
I'm relatively new to using the out
keyword so I might not even be going down the right path. Right now I am being told I need to assign control of the collection object before I can use it, however this will blow away any of the counts that it contains when it's passed in. Is there a way to use out
to keep the values or should I use another method?