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?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Dec 5, 2011, 1:40 PM
VulpesPosted Dec 5, 2011, 12:57 PM
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.