SORU
28 Temmuz 2009, Salı


SERİ sonuçları boş zaman dönüş nedir

SERİ Sorgu ile ilgili bir sorum var. Normalde bir sorgu döndürür IEnumerable bir tip. Eğer dönüş boşsa, değil emin eğer boş ise veya değil. Aşağıdaki ToList emin değilim() bir istisna ya da sadece boş bir Liste<dize> eğer bir şey IEnumerable sonuç bulundu atar mısın?

   List<string> list = {"a"};
   // is the result null or something else?
   IEnumerable<string> ilist = from x in list where x == "ABC" select x;
   // Or directly to a list, exception thrown?
   List<string> list1 = (from x in list where x == "ABC" select x).ToList();

Çok basit bir soru olduğunu biliyorum, ama VS olmak için kullanılabilir yok.

CEVAP
28 Temmuz 2009, Salı


Boş bir sayısız dönecektir. Boş olmayacak. Uyku ses :)

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • MusicDeluxeTV

    MusicDeluxeT

    14 Mayıs 2010
  • newreleaseblitz

    newreleasebl

    13 Ocak 2010
  • WePlayWeWatch

    WePlayWeWatc

    3 Temmuz 2013