Browsing 7239 questions and answers with Jon Skeet
The format parameter says what pattern to use - but it doesn't say anything about which calendar, month names, short date format etc to use. That's up to the IFormatProvider. For example, suppose you wanted to parse a value with the... more 11/29/2013 1:44:36 PM
Well the main problem is that you're trying to provide the parameter as part of the SQL itself. While there are ways of doing that (use an apostrophe rather than #), it's generally a bad idea: It invites SQL injection attacks when used... more 11/29/2013 1:36:59 PM
Both of those exceptions would be thrown back to the caller... although a single exception in any particular situation. If the body of the outer try block throws and then close throws as well, only the second exception would be seen by the... more 11/29/2013 11:45:37 AM
You're using hh, which is the 12-hour clock - but you've provided a value of 20. You want HH, which is the 24-hour clock: [dateFormatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss.SSSZ"]; more 11/29/2013 11:02:13 AM
The Date property just returns a DateTime with the same date, but at midnight. There's no difference between "a DateTime at midnight" and "a DateTime just representing a date" (unfortunately). You need to change how your DateTime is... more 11/29/2013 10:31:01 AM
If you've got a reference to System.dll, it should be fine - although looking at the documentation for some classes it looks like for the client profile of .NET 3.5, it was only introduced in .NET 3.5 SP1. So you either need the full... more 11/29/2013 8:29:45 AM
It sounds like you want an abstract class implementing the common functionality, but still have two concrete classes for the distinct functionality. You may or may not still want to keep the interface as well. So the options are: ... more 11/29/2013 6:48:53 AM
I suspect the problem is that you're not disposing of the WebResponse. That means the connection pool thinks that the connection is still in use, and will wait for the response to be disposed before reusing it for another request. The... more 11/29/2013 6:44:57 AM
Use replace instead of replaceAll - replaceAll takes a regular expression as the first argument, which isn't what you want. This should be fine: fileAddress = fileAddress.replace("\\", "\\\\"); (I wish replaceAll had been called... more 11/28/2013 8:59:18 PM
I believe the crux of your question is this part: But, the && operator has higher precedence than the || operator and should be evaluated first No. Precedence doesn't affect execution ordering. It's effectively bracketing. So... more 11/28/2013 5:54:33 PM