Browsing 7239 questions and answers with Jon Skeet
Your response element is actually in a namespace, due to this attribute in the root node: xmlns="DAV:" That sets the default namespace for that element and its descendants. So you need to search for elements in that namespace too.... more 6/12/2015 12:13:21 PM
I would strongly recommend using LINQ to XML instead of XPath for this. (You can use XPath, certainly - but it's less readable IMO. You'd just need to use ClientNodes[i].SelectNodes("Details").) var xml = XDocument.Load(...); foreach (var... more 6/12/2015 10:22:50 AM
The problem is that you're only conditionally calling CreateTree. Suppose parsingIsTotal is false - then this expression: parsingIsTotal && CreateTree(...) will evaluate the left hand operand, find that it's false, and not... more 6/12/2015 7:15:55 AM
There are two problems here: 1) You've declared a local variable a static. That's invalid. 2) If an exception is thrown early in your method, you're catching it and then trying to return status without ever assigning a value to it. I... more 6/12/2015 7:12:01 AM
You could use "optional sections" of the format pattern for this: DateTimeFormatter dtf = DateTimeFormatter.ofPattern("H:mm:ss[.SSSSSS]"); more 6/11/2015 6:15:18 PM
A LocalTime doesn't have a time zone. That's the whole point of it. If you want the LocalTime for a particular instant in a particular time zone, you can use DateTime and then toLocalTime: DateTime now = new DateTime(zone); // Urgh: see... more 6/11/2015 4:38:45 PM
You can use double.TryParse within LINQ, although admittedly the out parameter is annoying: ABCObject = ABCObject .Where(x => { double ignored; return double.TryParse(x => x.Text2, out ignored); } .GroupBy(c => c.ID) ... more 6/11/2015 4:35:06 PM
(Disclaimer: I work for Google, but I haven't looked at this API before.) Well, the problem when you call password.ToString() is that it's not providing the hex representation - so that's why the first piece of code fails. It looks like... more 6/11/2015 4:07:31 PM
Efficiency: protocol buffers are generally much more efficient at transmitting the same amount of data than Java binary serialization Portability: Java binary serialization is not widely implemented outside Java, as far as I'm aware... more 6/11/2015 2:58:36 PM
Since c is a final variable, isn't it a compile time constant No. The rules for constant expressions are given in JLS 15.28, and they don't include wrapper types: A constant expression is an expression denoting a value of... more 6/11/2015 1:41:51 PM