Browsing 7239 questions and answers with Jon Skeet
I believe the serialVersionUID is only used to determine the version of that class that has been serialized - the class name is always present too, so it won't lead to any ambiguity. Please let me know what is the use of putting same... more 9/25/2014 6:04:03 PM
Well, the compiler doesn't allow it because the language specification doesn't allow it. JLS section 8.3 (field declarations) specifies (emphasis mine): A class inherits from its direct superclass and direct superinterfaces all the... more 9/25/2014 4:54:07 PM
Others have explained why your switch statement is failing - and unless you need the numbers for some other reason, you can get rid of them. But you don't need the switch statement at all - just make the message an instance... more 9/25/2014 4:41:45 PM
Yes, that's because you've calling ToString() directly on a query for your second and third values - whereas in the first operation, you're calling Single() which will return a single string value. Basically, don't call ToString() on... more 9/25/2014 4:26:55 PM
I suspect that: The reason for the problem is due to some broken culture-specific settings on the one person's machine, e.g. a culture which uses an invalid DateTimeFormatInfo.ShortDatePattern The reason the direct stack frame isn't... more 9/25/2014 3:00:50 PM
In my view, it's better not to set it to a value. After all, that value is guaranteed to be replaced by the method call (assuming that doesn't throw an exception) so why bother specifying a value which is pointless? It just misleads the... more 9/25/2014 1:48:17 PM
The problem is that this expression: d + '^' doesn't involve any strings. It's trying to add an int and a char, which it does by promoting the char to int (which will have a value of 65342, because that's the UTF-16 code unit for '^'),... more 9/25/2014 1:46:01 PM
Basically, hexString.getBytes() doesn't do what you expect it to. It's just encoding the string as a byte sequence in your platform default encoding - it's got nothing to do with hex. You need to decode from hex to byte[] to start with.... more 9/25/2014 1:17:11 PM
JDBC parameters aren't usually usable for table and column names - they're only for values. Unfortunately, I think this is one of those cases where you will need to be build the SQL dynamically. You will want to be very careful about... more 9/25/2014 11:50:54 AM
This is the problem: .Select(d => d.Name) You're explicitly selecting the names of the elements. If you want the actual elements (which I think you do), just get rid of that call: var nodes = doc.Descendants().Elements(ns +... more 9/25/2014 11:44:47 AM