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

  • Bennythecoder

    Bennythecode

    25 Mart 2008
  • STITCHLESS TV how to sew your own style tutorials

    STITCHLESS T

    9 HAZİRAN 2011
  • YouChewBu

    YouChewBu

    26 Ocak 2009