Nerseus
Danner
I love watching people get fired up about things that arent necessarily important, but still fun to have opinions about... with that in mind:
Do you, or does your company, have a "standard" for using ref/ByRef vs ONLY allowing methods to return values?
Ive seen 3 typical scenarios:
1. [ref/ByRef is a strict no-no] A method should ONLY return a single value (the return type), ref/ByRef parameters used to return values is a no-no (maybe Ok to pass strings, for performance). If multiple returns are needed, us a custom object, hashtable, etc.
2. [ref/ByRef is perfectly acceptable] A method should return values using ref/ByRef whenever needed.
3. [ref/ByRef is mostly a no-no, but occasionally Ok] A method should almost never use ref/ByRef but its Ok in certain, VERY limited situations.
-ner
PS This comes to mind as a previous boss of mine is now looking to come work for my company as an "underling". He was/is extremely opinionated and once tied up a developer meeting for *hours* trying to get everyone convinced of something that he later flip-flopped on and then flip-flopped again a few months after that.
Do you, or does your company, have a "standard" for using ref/ByRef vs ONLY allowing methods to return values?
Ive seen 3 typical scenarios:
1. [ref/ByRef is a strict no-no] A method should ONLY return a single value (the return type), ref/ByRef parameters used to return values is a no-no (maybe Ok to pass strings, for performance). If multiple returns are needed, us a custom object, hashtable, etc.
2. [ref/ByRef is perfectly acceptable] A method should return values using ref/ByRef whenever needed.
3. [ref/ByRef is mostly a no-no, but occasionally Ok] A method should almost never use ref/ByRef but its Ok in certain, VERY limited situations.
-ner
PS This comes to mind as a previous boss of mine is now looking to come work for my company as an "underling". He was/is extremely opinionated and once tied up a developer meeting for *hours* trying to get everyone convinced of something that he later flip-flopped on and then flip-flopped again a few months after that.