I've made a function that processes an array of objects, process(Object[]). It works on any type including integers and floats so long as you box each element first. I'd like the function to take unboxed elements aswell, if only to box it itself before processing. How do I do that?
I could wrap with a few functions like process(int[]) and process(float[]) but that also seems a hassle. I've tried process(ValueType[]) but the compiler still selects process(Object[]).
I have C# 2.0, but if there is a nice solution for 3.0 I'd like to see it.