Click here to Skip to main content
15,902,635 members

Comments by Member 11169882 (Top 12 by date)

Member 11169882 6-Feb-17 22:19pm View    
Yes, I realised that after I saw solution 4. And thank you for your helpful insight, tips like this really do help me become a better developer. At the time I was trying different things and TryGetValue wasn't liked by the compiler for some reason (when I was trying it) i was probably using it incorrectly. I am still not the best at using linq but it is very very useful in .NET from my uses of it so far. Again your input is greatly appreciated, have a great day!
Member 11169882 6-Feb-17 14:49pm View    
see Solution 4, thanks for your reply!
Member 11169882 6-Feb-17 14:24pm View    
See solution 4, thank you for your answer, really appreciate your time!
Member 11169882 6-Feb-17 14:23pm View    
I believe the lookup would work better the way i did it if i wasn't inside of a loop, however since I am looping for each item, a tryget is much more efficient. The issue was that earlier I was using a keyValuePair, and not a dictionary and the compiler wasn't accepting "TryGetValue" but now it was working as i made a few tweaks using your solution.
Thanks again!
Member 11169882 6-Feb-17 14:21pm View    
Although your solution didnt work for me, I want to thank you for your time and help :) I learned something from your implementation as well! See solution 4 for what worked for me.
Thanks