Hi friends,
I want to know that If a function hello() is to receive an int, Single & a double and it is to return a decimal then which of the following is the correct way of defining this function?
Way of defining function in C#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Dec 5, 2011, 7:57 AM EST
decimal hello(int i, float f, double d)
{
// code which returns a decimal
}
Notice that C#'s built-in float type is the same as the framework type System.Single i.e. a 4 byte floating point number.
Sam HobbsRank #107 · 20.5K reputationPosted Dec 5, 2011, 8:40 AM EST