ienumerable
Why is my domain to dto converter called twice?
I encounted a strange behavior in my wcf service. This is my opreation contract implementation: public IEnumerable<Dto.ProductType> GetAllProductTypes()[详细]
2023-03-19 21:51 分类:问答LINQ: Creating an IEnumerable<T> from another IEnumerable<T>?
I have the following: public class Foo { public int x { get; set; } } publi开发者_StackOverflowc class Bar[详细]
2023-03-19 08:53 分类:问答How do I Iterate Linq group result set?
I\'m getting some data from my database and using linq to calculate sums and counts and group the data.[详细]
2023-03-19 07:57 分类:问答How can I detect adds to a generic list in C# 4.0?
I have a subclass of List<Location> called LocationList.This is a convenient way for us to add other properties (like IsExpanded and such that we can use in the UI.Good enough.But now, we want e[详细]
2023-03-18 19:01 分类:问答Most efficient way to remove items from a list without running into a collection modified exception?
I have 2 lists: ListA { \'A\', \'B\', \'C\' } //ListA is DictA.Keys ListB { \'B\', \'X\', \'Y\' } //ListB is DictB.Keys[详细]
2023-03-18 15:19 分类:问答IEnumerable reduces when changing it's content?
I have found strange behavior of IEnumerable. When i create a colle开发者_JAVA技巧ction using Linq to XML and than loop the collection and change it\'s elements, the collection size reduces by 1 on ea[详细]
2023-03-18 03:40 分类:问答Wrapping a mutable collection with a sequence
Occasionally, I want to return a mutable collection from a function as a sequence. Upcasting to seq<_> works, but the sequence could be downcasted and modified (not that it usually matters开发者[详细]
2023-03-18 01:48 分类:问答Resharper: Possible Multiple Enumeration of IEnumerable
I\'m using the new Resharper version 6. In several places in my code it has underlined some text and warned me that there may be a Possible multiple enumeration of IEnumerable.[详细]
2023-03-17 20:20 分类:问答How can I randomly ordering an IEnumerable<>?
I have this IEnumerable : IEnumerable<MyObject> and I need to order the list of the MyObject randomly. Do I need to cast into an ArrayList?[详细]
2023-03-17 15:44 分类:问答How to make this more generic
[code] private static IOrderedEnumerable<Film> OrderBy(this IEnumerable<Film> source, Func<Film, object> order, bool desc)[详细]
2023-03-17 10:58 分类:问答