adplus-dvertising
frame-decoration

Question

What will be the output of the given code snippet below?
{
    delegate string F(string str);
    class sample
    {
        public static string fun(string a)
        {
            return a.Replace(',''-');
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            F str1 = new F(sample.fun);
            string str = str1("Test Your c#.NET skills");
            Console.WriteLine(str);
        }
    }
}

a.

Test Your

b.

Test-Your-C#.NET-Skills

c.

ur C#.NET Skills

d.

None of the mentioned

Posted under C# programming

Answer: (b).Test-Your-C#.NET-Skills

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the given code snippet below?