SORU
28 EKİM 2009, ÇARŞAMBA


Lambda ifade inen OrderBy?

Normal etmeniz dilbilgisi, "orderby xxx" çok kolay, ama nasıl Lambda ifadesinde bunu ben de? inen biliyorum

CEVAP
28 EKİM 2009, ÇARŞAMBA


Brannon dediği gibi, OrderByDescending ThenByDescending:

var query = from person in people
            orderby person.Name descending, person.Age descending
            select person.Name;

eşittir:

var query = people.OrderByDescending(person => person.Name)
                  .ThenByDescending(person => person.Age)
                  .Select(person => person.Name);

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Kiddyzuzaa

    Kiddyzuzaa

    25 ŞUBAT 2014
  • PlayStation

    PlayStation

    16 Aralık 2005
  • Tome Rodrigo

    Tome Rodrigo

    9 Temmuz 2006