Combine Array Elements in C#

Dec 2 2020 8:57 AM
I have an array of string which is
  1.    string[] myarr = new[] { "a""b""c" };  
Can you please help me how to get this result?
  1. a  
  2. ab  
  3. abc  
I tried this one but I just don't know how to get the value from the array and add it on my list
  1. string[] myarray = new string[] { "a""b""c" };  
  2. List resultarray = new List();  
  3. int i, j;  
  4. for (i = 0; i <= myarray.Length; i++)  
  5. {  
  6. for (j = i; j <= i; j++)  
  7. {  
  8. }  
  9. }  

Answers (4)