A naive question I know and after two years of experience I am stuck to answer it.
Simply I need to create a generic method and this method may take int, double, float and compare them and find the bigger value:
object ComapreMethod(object obj1, object obj2)
{
if(obj1 > obj2)
{
return obj1;
}
return obj2;
}
I want to call it for the int,short,ushort,float,double,...etc what I am really stuck with how to compare between obj1 and obj2 I can't write it by the way above I know it is naive but I dunno it