Examveda

What is the correct way to call a method named PrintName with a string parameter name in C#?

A. PrintName("John");

B. PrintName(name: "John");

C. PrintName = "John";

D. PrintName(name);

Answer: Option B


Join The Discussion

Related Questions on Functions and Methods in C Sharp