عنوان:

‫چه نوع collection هایی را بهتر است در پارامترهای متدهای #C استفاده کنیم؟


نویسنده: وحید نصیری
تاریخ: ۱۳۹۸/۰۲/۰۵ ۱۲:۳۱
آدرس: www.dntips.ir

IEnumerable<T> is a good fit for many scenarios, but do consider that IReadOnlyCollection<T> might be a better fit in circumstances where the collection is always going to be fully available in memory. Avoid passing round mutable collection types as this can cause confusion about who owns the collection. 



مشاهده مطلب اصلی