Fórum ForEach em Listlt;gt; #21145
06/11/2008
0
Obrigado,
Alexei.
Buenolex
Curtir tópico
+ 0Posts
06/11/2008
Codename.v
//Cria uma nova generic list de string.
List<string> lstString = new List<string>();
//Insere cem valores no list.
for(int count = 0; count < 100; count++)
{
lstString.Add("Valor " + count.ToString());
}
//Percorre a list usando foreach e exibe o valores na tela.
foreach(string str in lstString)
{
Console.WriteLine(str);
}
Sem mais... 8)
Abraços!
Gostei + 0
23/01/2009
Proglele
Types.Categoria oCategoria = new Types.Categoria();
BLL.Categoria objCategoria = new BLL.Categoria();
objCategoria.SelecionarCategorias().
ForEach(delegate (Types.Categoria newObjCategoria)
{
// faz alguma coisa com alista.
}
Gostei + 0
17/02/2009
Ricardo Silva
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)