Vidyalelo
C# Programming · Q58

Delegates and Events in C Sharp

Programming · C# Programming · question 58

Q58

In the following C# code, which statements are perfectly valid? public class Csharp public void subject (S arg) Console.WriteLine(arg); class Program static Void Main(string[] args) Csharp c = new Csharp(); c.subject("hi"); c.subject(20);

A.
Run time exception error
B.
Compile time error
C.
Code runs successfully and prints required output
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