Vidyalelo
C# Programming · Q37

Delegates and Events in C Sharp

Programming · C# Programming · question 37

Q37

What will be the output of the following C# code snippet? delegate void A(ref string str); class sample public static void fun( ref string a) a = a.Substring( 7, a.Length - 7); class Program static void Main(string[] args) A str1; string str = "Test Your C#.net skills"; str1 = sample.fun; str1(ref str); Console.WriteLine(str);

A.
Test Your
B.
ur C#.NET
C.
ur C#.NET Skills
Answer
D.
None of the mentioned

Answer: Option C

Solution

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