Browsing 7239 questions and answers with Jon Skeet
Well you've said that any time you finish loading a page, you want to submit the search form. So when that submit finishes, it will finish loading the page... and you'll trigger the same event. It's an entirely natural loop. You should... more 3/7/2014 9:49:55 AM
I do NOT close and reopen the connection for each message. Yes you do... at least as far as the plain Connection object is concerned. Otherwise, if you ever end up with a broken connection, it'll be broken forever, and if you ever... more 3/7/2014 7:23:57 AM
If you want to convert to a specific format, you should use a separate DateFormat for that. Currently you've only shown code to parse, and that just returns a Date - an instant in time. You'll need to work out everything you need about... more 3/7/2014 7:15:47 AM
You're calling toString() on an array - arrays don't override toString(), so you end up with the implementation from Object: The toString method for class Object returns a string consisting of the name of the class of which the object... more 3/7/2014 7:06:03 AM
Yes, currently i can take every value within the length of s - and you're assuming that there are that many elements after splitting. You should split once, and then iterate over that: string s = dt.Rows[0]["tstrim"].ToString(); string[]... more 3/7/2014 6:53:14 AM
Yes, using the == operator is absolutely fine, so long as the compile-time type of Order is int. If the compile-time type were object for example, then you'd be dealing with boxed int values and comparing those boxes with reference... more 3/6/2014 8:07:50 PM
Well you'll either need to loop through it each time, or create another list of just the trimmed values, and use that for searching. (Heck, you could create a HashSet<string> if you only need to know whether or not a trimmed value is... more 3/6/2014 3:06:27 PM
Edit: The full extent of advice I could find in other questions was 'use Sandcastle'. As far as I can tell from its (ironically limited) documentation, it can only create Windows help files (.chm). Is that correct? No, that's not... more 3/6/2014 3:02:02 PM
No. Anonymous types always implicitly derive from object, and never implement any interfaces. From section 7.6.10.6 of the C# 5 specificiation: An anonymous object initializer declares an anonymous type and returns an instance of that... more 3/6/2014 2:07:49 PM
This is the problem: private OdbcConnection db { get; private set; } Assuming you really want both the getter and setter to be private, this should be: private OdbcConnection db { get; set; } The setter is already private, as that's... more 3/6/2014 2:01:58 PM