

MCQOPTIONS
Saved Bookmarks
1. |
Given is the code of days(example: MTWTFSS ) which i need to split and hence create a list of days of week in strings(example: Monday , Tuesday , Wednesday , Thursday , Friday , Saturday , Sunday ). A set of code is given for this purpose but there is error ocuring in that set of code related to conversion of char to strings.Hence,Select a code to solve the given error.
static void Main(string[] args) { var days = "MTWTFSS"; var daysArray = days.ToCharArray().Cast |
A. | Var daysArray = new List(); |
B. | Var daysArray = days.Select(c =>dayMapping[c]).ToArray(); |
C. | Var daysArray = days.ToCharArray().Select(c =>c.Tostring()).ToArray(); |
D. | None of above mentioned. |
Answer» D. None of above mentioned. | |