What will be the output of the following code snippet?

Q

What will be the output of the following code snippet?

✍: Guest

A

What will be the output of the following code snippet?

using System;
class MainClass
{
static void Main( )
{
new MainClass().Display( 3.56 );
}

private void Display( float anArg )
{
Console.Write( “{0} {1}”, anArg.GetType(), anArg );
}

double Display( double anArg )
{
Console.Write( “{0} {1}”, anArg.GetType(), anArg );
return anArg;
}

public decimal Display( decimal anArg )
{
Console.Write( “{0} {1}”, anArg.GetType(), anArg ); return anArg;
}
}

* System.Single 3.56
* System.Float 3.56
* System.Double 3.56
* System.Decimal 3.56


System.Double 3.56

2014-09-02, 1542👍, 0💬