Home » C# Programming » Generics

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

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!