Examveda

Which of the following is NOT a valid way to instantiate a string in C#?

A. string str;

B. string str = "Hello";

C. string str = "";

D. string str = new string();

Answer: Option D


This Question Belongs to C Sharp Programming >> Introduction To C Sharp

Join The Discussion

Related Questions on Introduction to C Sharp