.Net > Random > Beginner Next/Skip this question

What would be the output of following code snippet?

using System;

class MyClass
{
    public int MyMethod(int i)
    {
        return i + 5;
    }
    public string MyMethod(int i)
    {
        string s = i.ToString() + "s";
        return s;
    }
}

class MyProgram
{
    static void Main(string[] args)
    {
        MyClass m = new MyClass();
        string s = m.MyMethod(10);
        Console.WriteLine(s);
        Console.ReadLine();
    }
}
Answers :
Explaination :
social share share on facebook share on twitter share on google plus share on linkedin
Add Comments :

Login

Register

Next Question