Click here to Skip to main content
15,066,066 members

Comments by Robert Rohde (Top 8 by date)

Robert Rohde 23-Sep-13 9:23am View
Reason for my vote of 1 \n You are testing so wrong that I don't know where to start.
First of all you should know that you are primary testing the performance of Console.WriteLine. The rest (especially your "measured" difference) are pure JIT effects. Try switching the test (first HashTable then Dictionary) and you will most probably see that Dictionary wins.
To make your test better do the following:
1. Remove the Console.WriteLine and make something else which clearly doesn't consume much processing power.
2. Always test several times and calculate an average time.
3. Make the test base bigger. 1000 Elements are nothing.
Robert Rohde 6-Dec-11 15:22pm View
"I'm assuming his query is properly formed and that he's done everything else he needs to do to make it work" sounds a bit naive. If he asks such a simple question do you really think he knows what he's doing...?
Robert Rohde 6-Dec-11 7:34am View
Even though your solution is "a bit" better than from Uma and Derek this is still dangerous. Just because it starts with "select" it doesn't mean that it cannot modify the database.
Like mjbohn said this should be made with a specialized database user with read only access rights.
Robert Rohde 31-Aug-11 3:54am View
Why do you not just use one Combobox where all infos (id, name and location) are shown together?
Robert Rohde 17-May-11 1:45am View
You forgot to set isAdded to true.
Robert Rohde 12-Mar-11 17:23pm View
It doesn't work because you declare XMLExtension and XMLHex within the loop. Thus its only visible there. Declare it outside and it'll work.
You should also optimizeyour two linq queries into one:
var result = (from FileSigs in myDoc.Elements()
from Images in FileSigs.Elements()
from sigs in Images.Elements()
where (storedFileSig.Contains(sigs.Value))
select new { Name = sigs.Attribute("name").Value, Value = sigs.Value }).

string xmlExtension = result == null ? "" : result.Name;
string xmlHex = result == null ? "" : result.Value;
Robert Rohde 22-Feb-11 2:26am View
He was asking about efficiency. I think he already tried doing it row by row and this is too slow for him...
Robert Rohde 20-Feb-11 1:07am View
The default constructor is only created when absolutely no other constructor is defined. You don't need to specifiy it if you have other constructors (with arguments) in place.
Also don't spam all others answers just because you think you've "guessed" what the originalauthor means. The question is vague so its unclear what the poster meant with it.