c# - Separate string array into columns of 32 -


i have string array 96 elements. array formatted 1 string this:

str    str str    str str    str str    str 

instead of this:

str str str str str str str str 

but 32 in each column instead of 4.

how can this?

thanks.

if want 32 "rows" , 3 "columns" can use linq query:

string[] strings = enumerable.repeat("str", 96).toarray(); ienumerable<string[]> arrays = strings     .select((str, index) => new { str, index })     .groupby(x => x.index / 3)     .select(g => g.select(x => x.str).toarray()); 

so each string[] contains 3 strings , sequence contains 32 string[]s.


Comments

  1. Being effective in fantasy cricket necessitates intelligence and a thorough understanding of the game, as well as keeping up with the newest news and developments in the sport. World777 Fantasy cricket is the final test of many people's cricket knowledge.

    ReplyDelete

Post a Comment

Popular posts from this blog

rest - Spring boot: Request method 'PUT' not supported -

php - Magento - Deleted Base url key -

symfony - imagine_filter() not generating the correct url in LiipImagineBundle -