I created a function that processes an array of objects, a process (Object []). It works with any type, including integers and floats, if you put each element first. I would like the function to also accept unboxed elements, but only to place it immediately before processing. How to do it?
I could wrap several functions like process (int []) and process (float []), but this also seems to be troublesome. I tried the process (ValueType []), but the compiler still selects the process (Object []).
I have C # 2.0, but if there is a good solution for 3.0, I would like to see it.
source
share