28
It seems that c# does not support c++ like templates. For example
template <class myType>
myType GetMax (myType a, myType b) {
return (a>b?a:b);
}
I want my function to have return type based on its parameters, how can i achieve this in c#? How to use templates in C#
EDIT: Can i use object and getType for the almost same purpose?