Examveda

What is the correct syntax to access the second character of a string named text in C#?

A. text.IndexOf(1)

B. text.SubString(1)

C. text.charAt(1)

D. text[1]

Answer: Option D


Join The Discussion

Related Questions on Arrays and Strings in C Sharp