Skip to main content
12 events
when toggle format what by license comment
Dec 22, 2015 at 7:45 vote accept Harshit
Dec 22, 2015 at 6:40 comment added Alexei No, the dictionary can have a value that has multiple properties. E.g.: r => new { Name = r.Field<String>("Name"), DefectId = f.Field<int>("defectId"), other properties in anonymous type come here }.
Dec 22, 2015 at 6:37 comment added Harshit Thanks @Alexei, for your reply. As I am seeing your edited question, do I have to create separate dictionary for every datatable column i.e. q.cID, q.status, q.defectID, q.name, q.description, q.dftAID, q.dftName? I have edited my question to add some more details.
Dec 22, 2015 at 5:36 comment added Alexei Forgot to add a comment after posting the edit. I have added an option using Dictionary<> that is supported in 3.5.
Dec 21, 2015 at 21:32 history edited Alexei CC BY-SA 3.0
added another trial code + results
Dec 21, 2015 at 7:36 comment added Harshit May be that's why it is not working for me since I am using VS 2008 with 3.5 framework. Thanks for your reply
Dec 21, 2015 at 7:31 comment added Alexei I am using VS2013 Community here. AsParallel() is part of PLINQ - msdn.microsoft.com/en-us/library/dd997425(v=vs.100).aspx - and it is available from .NET Fwk 4.0 (Visual Studio 2010+).
Dec 21, 2015 at 7:15 comment added Harshit I am getting an error when I am using AsParallel(). does not contain a definition for 'AsParallel'. How did you ran it ? I am using visual studio 2008.
Dec 21, 2015 at 6:16 comment added Alexei Then your path is clear. You just add AsParallel to your IEnumerables and leave the logic in C#. Another option is to try using Dictionary<int, SomeClassHoldingTheData> for data tables used in joins, so that id match is done faster (I will give it a try once I have some spare time).
Dec 21, 2015 at 4:06 comment added Harshit Thanks for your reply. If I do calculations or perform queries then it takes much CPU f the server. Also, I use this above taken data from the datatable at various place, which prevents from every time visiting to the database.
Dec 20, 2015 at 8:01 history edited Alexei CC BY-SA 3.0
performed minor improvements
Dec 19, 2015 at 22:13 history answered Alexei CC BY-SA 3.0