Is it possible for a function to return two values? Array is possible if the two values are both the same type, but how do you return two different type values?
You have basically (at least) two options, either you make an out parameter in addition to the return value of the function, something like T1 Function(out T2 second) or you make your own class putting these two types together, something like a Pair. I personally prefer the second way but it's your choice.