Home » C# Programming » Generics

For the code snippet shown below, which of the following statements are valid? public class TestCuriousTab { public void TestSub (M arg) { Console.Write(arg); } } class MyProgram { static void Main(string[] args) { TestCuriousTab tab = new TestCuriousTab(); tab.TestSub("CuriousTab "); tab.TestSub(4.2f); } }

Correct Answer: Program will compile and on execution will print: CuriousTab 4.2

← Previous Question Next Question→

More Questions from Generics

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion