// ===++===
//
// OrtizOL
//
// ===--===
/*============================================================
//
// Clase: UsoSelect.cs
//
// Propósito: Demostración de la clausula where.
//
============================================================*/
using System;
using System.Collections.Generic;
using System.Linq;
namespace Recetas.Cap02
{
internal class UsoSelect
{
public static void Main()
{
// Creación de lista genérica con tipos int:
List<int> puntajes = new List<int>() {97, 92, 81, 60};
// Creación de consulta:
IEnumerable<int> puntajesAlto = from puntaje in puntajes where puntaje > 80 select puntaje;
// Iteración de la consulta:
foreach (int puntaje in puntajesAlto)
{
Console.Write("{0} ", puntaje.ToString());
}
Console.WriteLine();
}
}
}
Ly8gPT09Kys9PT0KLy8KLy8JT3J0aXpPTAovLwovLyA9PT0tLT09PQovKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQovLwovLyBDbGFzZTogVXNvU2VsZWN0LmNzCi8vCi8vIFByb3DDs3NpdG86IERlbW9zdHJhY2nDs24gZGUgbGEgY2xhdXN1bGEgd2hlcmUuCi8vCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgp1c2luZyBTeXN0ZW07CnVzaW5nIFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljOwp1c2luZyBTeXN0ZW0uTGlucTsKCm5hbWVzcGFjZSBSZWNldGFzLkNhcDAyCnsKCWludGVybmFsIGNsYXNzIFVzb1NlbGVjdAoJewoJCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCQl7CgkJCS8vIENyZWFjacOzbiBkZSBsaXN0YSBnZW7DqXJpY2EgY29uIHRpcG9zIGludDoKCQkJTGlzdDxpbnQ+IHB1bnRhamVzID0gbmV3IExpc3Q8aW50PigpIHs5NywgOTIsIDgxLCA2MH07CgkJCQoJCQkvLyBDcmVhY2nDs24gZGUgY29uc3VsdGE6CgkJCUlFbnVtZXJhYmxlPGludD4gcHVudGFqZXNBbHRvID0gZnJvbSBwdW50YWplIGluIHB1bnRhamVzIHdoZXJlIHB1bnRhamUgPiA4MCBzZWxlY3QgcHVudGFqZTsKCQkJCgkJCS8vIEl0ZXJhY2nDs24gZGUgbGEgY29uc3VsdGE6CgkJCWZvcmVhY2ggKGludCBwdW50YWplIGluIHB1bnRhamVzQWx0bykKCQkJewoJCQkJQ29uc29sZS5Xcml0ZSgiezB9ICIsIHB1bnRhamUuVG9TdHJpbmcoKSk7CgkJCX0KCQkJCgkJCUNvbnNvbGUuV3JpdGVMaW5lKCk7CgkJfQoJfQp9