I have an IEnumerable that I want to get all the distinct MaterialIDs.I have code that is working but I was wondering if there is a better way possible using LINQ.Here\'s the code I have:
How do I go from (cast?, convert?开发者_开发技巧): IEnumerable<Square> to IEnumerable<Shape>
I need to return an IEnumerable of a dynamically created Dictionary. pseudo code: var x = from u in Users
How can I do that? thats a no go: ObservableCollection obsCol = newObservableCollection(myIEnumerable);
I have a simple value type: [Serializable] private struct TimerInstance { public TimerInstance(string str, long nTicks)
I have been looking on Stack overflow but none of the answers seem to fully sort out this problem. The error I\'m getting is:
I can\'t find any FindAll method in my List, how can i select objects from the List that respond to a specific criteria, without using the old iterating method?
I have an interesting problem to solve that would be helped by successfully casting obj开发者_JS百科ects created by LINQ to SQL into a single master object that I could pass around.Here is the scenari
Special thanks to Rex M for this bit of wisdom: public IEnumerable<Friend> FindFriends() { //Many thanks to Rex-M for his help with this one.
This question already has answers here: IList vs IEnumerable for Collections on Entities (2 answers) 开发者_StackOverflow社区