A have the string array and I need to select 9 elements starting from 20:
string sel = data.Skip(19).Take(9).ToString();
Where is error?
SOLUTION:
string sel = String.Concat(data.Skip(19).Take(9).ToArray());
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take(9)returns anIEnumerable<string>. When you callToString()on it you just get the name of the type. You need to do this instead:selectedis now of typestring[]and should contain 9 elements (ifdatacontains enough elements, that is).