Browsing 7239 questions and answers with Jon Skeet
Implies I can actually cast list to dictionary Well, it implies that the cast would be valid at compile-time. It doesn't mean it will work at execution time. It's possible that this code could... more 6/19/2014 3:59:20 PM
I think the code below is what you want. You need to put each element into the right namespace, and remove any xmlns='' attributes for the affected elements. The latter part is required as otherwise LINQ to XML basically tries to leave you... more 6/19/2014 2:37:10 PM
If br.readLine() returns null, then calling .equals(null) on it will throw an exception - it won't return true. You just want to compare reference identity with null. Calling .equals(null) is never useful, unless you're testing that your... more 6/19/2014 2:17:39 PM
Looking at some jQuery documentation I think you're using the wrong property. I suspect this: method: "POST" should be type: "POST" method feels like the more sensible name to me too, but there we go... (Disclaimer: I've never used... more 6/19/2014 1:43:36 PM
Assuming you don't need the objects to interact with each other at all, ThreadLocal<T> is a very good choice here. It obviously doesn't work if modifications made in one thread are meant to be seen in another thread, just... more 6/19/2014 12:49:21 PM
It sounds like you really want something like: spinner.IsBusy = true; try { Task t1 = Task.Run(() => dataX = loadX()); Task t2 = Task.Run(() => dataY = loadY()); Task t3 = Task.Run(() => dataZ = loadZ()); await... more 6/19/2014 12:32:08 PM
all return me non us format No, they return you a DateTime value. A DateTime value doesn't have a format. It's just a date and a time. When you want to convert that back into a string, it will use the default format for your current... more 6/19/2014 10:34:46 AM
This is the problem: select new { ... } That's creating an instance of an anonymous type. How do you expect that to create a Business.Entities.EF.Applicant object? You may well just need to change your code to: select new... more 6/19/2014 10:25:57 AM
When you operate directly, it's permittable for operations to be performed at a higher precision, and for that higher precision to be continued for multiple operations. From section 4.1.6 of the C# 5 specification: Floating-point... more 6/19/2014 10:13:12 AM
You'd have to use reflection, basically. For example: // This assumes it really is just a List<T>... IEnumerable list = (IEnumerable) dataSource; Type elementType = list.GetType().GetGenericArguments()[0]; PropertyInfo property =... more 6/19/2014 9:05:28 AM