Vidyalelo
C# Programming · Q69

Delegates and Events in C Sharp

Programming · C# Programming · question 69

Q69

What will be the output of the following C# code snippet? 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
Answer
C.
ur C#.NET Skills
D.
None of the mentioned

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board