Browsing 7239 questions and answers with Jon Skeet
No, xml:space = preserve is talking about whitespace within the XAML. It's not useful to you here. The important point is that the browser is displaying it with a monospaced font, whereas you're using a variable-width... more 12/26/2013 8:13:54 PM
You're calling ToString on a query - that's not on a single element. Even if you fixed that, you'd add lots of references to the same object to your list... and this can all be done much more clearly with LINQ: List<Book> books =... more 12/26/2013 8:11:26 PM
EDIT: Ah, I was mistaken in what was wrong. This is the problem. serverSocket.BeginAccept(new AsyncCallback(RecieveCallback), null); Note that you're using RecieveCallback instead of AcceptCallback. So you end up in RecieveCallback... more 12/26/2013 7:54:41 PM
I suspect this is the problem: android:xmlns:facebook="http://schemas.android.com/apk/res-auto" I'd expect it to just be: xmlns:facebook="http://schemas.android.com/apk/res-auto" more 12/26/2013 9:33:18 AM
Well, to start with it doesn't need to be UTF-16 to support all characters - I'd recommend UTF-8 instead of UTF-16. However, basically you should transfer it as if it's a just a binary file (in binary mode in FTP). That way the bytes will... more 12/26/2013 9:20:29 AM
System.out is a bit special. Even though it's a final field, it's manipulated by native code - which is how System.setOut is able to work. When the System class is initialized, System.out is initialized in native code to a reference to an... more 12/26/2013 9:08:07 AM
No, a is a local variable. That means each invocation of foo gets its own separate variable - whether that's in multiple threads or even recursively within the same thread. Note that this isn't about sharing code - it's about sharing... more 12/25/2013 8:53:03 PM
While you could hard-code the names as variables, I suspect you'd be better off with a Dictionary<string, Dictionary<string, string>>: var settings = element.Elements("section") .ToDictionary(section =>... more 12/25/2013 1:18:53 PM
Well the compiler error message is fairly clear: Assert is a static class, so you can't use that as the parameter type for the extension method. It's not clear why you wanted to in the first place, to be honest. If you were hoping to be... more 12/25/2013 8:22:43 AM
It sounds like you want to find the first ProductDetail element with a given product ID. This would do the trick for that: public XElement FindProduct(XDocument doc, int id) { return doc.Descendants("ProductId") ... more 12/24/2013 7:34:17 PM