Domanda

alt text http://barbarosalp.com/questions/list.png

Ciao,

Come puoi vedere nella foto sopra, ho un Elenco " chiavi " riempito con Request.Form.AllKeys che una chiave inizia con " txt " ;.

Voglio raggrupparli in base al loro ultimo ID, ad esempio

[0] "txtTitle:2" "txtDescription:2"
[1] "txtTitle:3" "txtDescription:3"

Come posso ottenerlo con l'espressione lambda.

Grazie mille

È stato utile?

Soluzione

var groups = keys.GroupBy(e=>e.Split(':').Last());
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top