robertino_salemi
03-03-2015, 10:49
Buon dì!
Ho una collection di object, da questa vorrei tirare fuori una lista formata da una property, separati da un "," e che rispettano una condizione...
Nella mia collection, gli object hanno come proprietà:
- IsChecked che è un bool
- IdNo che è un int
items è la mia collection, quindi ho:
string tmpList = string.Empty;
tmpList = String.Format(",", items.Where(x => x.IsChecked == true).Select(x => x.IdNo).ToArray());
ma tmpList rimane sempre vuoto...
Grazie
Ho una collection di object, da questa vorrei tirare fuori una lista formata da una property, separati da un "," e che rispettano una condizione...
Nella mia collection, gli object hanno come proprietà:
- IsChecked che è un bool
- IdNo che è un int
items è la mia collection, quindi ho:
string tmpList = string.Empty;
tmpList = String.Format(",", items.Where(x => x.IsChecked == true).Select(x => x.IdNo).ToArray());
ma tmpList rimane sempre vuoto...
Grazie